Research · implementation

Mobile Vault persistence across CloudKit and local fallback

The Quesar mobile Vault keeps one CRUD contract while selecting either the user's private CloudKit database or an encrypted local SecureStore fallback and exposing the selected backend to the application.

AIWDBX

One data contract, two persistence profiles

The cloud adapter defines list, create, update, and delete operations over Vault documents. When the native CloudKit module is available it uses the signed-in user's private iCloud database; otherwise the same operations use an encrypted local SecureStore payload.

The adapter reports its active backend as either cloudkit or local. That makes the fallback inspectable by the UI and by tests instead of presenting local-only persistence as successful cloud synchronization.

Failure containment

Local records are normalized and ordered before return, and an unreadable local payload is contained as an empty local collection. The native bridge is loaded as an optional module so environments without the signed iOS capability can still exercise the Vault workflow.

This profile supports iterative mobile development while preserving a clear acceptance boundary: the local path validates the application contract, whereas CloudKit acceptance requires a properly entitled native build and a real device or supported simulator environment.

Limitations

  • Expo Go, web, Android, and unsigned iOS development environments use the local fallback; they do not prove CloudKit synchronization.
  • The adapter does not by itself establish conflict resolution across devices, service availability, backup guarantees, or end-to-end signed-device acceptance.