Skip to content

feat(mobile): encrypted offline store on iOS and no save-password prompt after Keepiq's forms (tasks 1.6.1, 3.2.1) - #1184

Merged
rubenvdlinde merged 8 commits into
developmentfrom
feat/mobile-ios-gaps
Oct 6, 2026
Merged

rubenvdlinde merged 8 commits into
developmentfrom
feat/mobile-ios-gaps

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What this changes

Two iOS gaps of clients-mobile-apps close: the encrypted offline store (task 1.6.1) and the "Save Password?" offer after Keepiq's own forms (task 3.2.1).

Task 1.6.1: the encrypted offline store on iOS

  • SQLCipher Community Edition 4.19.0 (BSD-style licence, free software) is built from the pinned release source. The build checks its SHA-256, makes the amalgamation once and compiles it per iOS target with CommonCrypto, as Argon2 is built. The sqlcipher cinterop bundles libsqlcipher.a into the klib.
  • SQLDelight's native driver links it with linkSqlite off. The Xcode project no longer links libsqlite3.tbd, so the system SQLite cannot answer the store's calls.
  • IosEncryptedStore opens one store per account with a raw 256-bit key. The key is 32 random bytes in a Keychain item (KeychainStorage: kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly, no biometric access control). The store folder is excluded from backups.
  • The store refuses to open when PRAGMA cipher_version answers nothing, and then deletes the plaintext file it would leave. A file whose key is gone starts again empty.
  • IosVaultSession.open gives the app a session with the store and VaultSync, as VaultSession.open does on Android. Names, URLs and folder names are sealed under the unlock key by the shared VaultStore.
  • Eviction: unpair deletes the file and its key (client.onWipe). A suite change, a master-password change and offline caching turned off empty the store through VaultSync. A sync lock reaches AppModel through SyncLock, which also deletes the biometric and PIN wraps.
  • Offline reading uses the existing list note and refused edits. The replay gets POST /__e2e/offline, which drops every other connection.

Task 3.2.1: no "Save Password?" after Keepiq's forms

iOS reads the user name and password fields when they leave the view hierarchy. Apple says so in WWDC 2018 session 204, "Automatic Strong Passwords and Security Code AutoFill": "Make sure to only clear the username and password fields after they've been removed from the view hierarchy. This way, we can read out the data and save it into credential."

Keepiq does the reverse. After a save went through, the item form, the Send form and the AutoFill sheet's add-login form empty their secret fields, wait 200 ms and then leave. The fields stay SecureFields, so VoiceOver still announces them as secure. A failed save keeps what the user typed.

VaultFlowsUITests.expectNoSavePasswordPrompt fails again when the prompt comes. AutofillUITests records whether it came after the add-login form.

Verified

Results pending: CI runs on this PR. This section is filled in once the five mobile checks are read.

Inherited

PHPUnit pgsql, Newman and Quality Report are red on development and are not touched here.

🤖 Generated with Claude Code

SQLCipher Community Edition 4.19.0, built from the pinned release source
(SHA-256 checked) into the KeepiqShared klib per iOS target, linked by the
SQLDelight native driver instead of the system SQLite. The database key is
32 random bytes per account in a non-biometric Keychain item
(AfterFirstUnlockThisDeviceOnly, through KeychainStorage). The store refuses
to open when SQLCipher is missing (PRAGMA cipher_version), and a file whose
key is gone starts again empty. Unpair deletes file and key; suite change
and offline caching off empty it through VaultSync, as on Android.

The iOS app opens its sessions through IosVaultSession with the store and
sync; the lock and wrap deletion of a sync reach AppModel. Tests: the store
on the iOS simulator (IosEncryptedStoreTest) and OfflineUITests, which reads
the stored vault after the replay drops every connection
(POST /__e2e/offline).
….2.1)

iOS reads the user name and password fields when they leave the view
hierarchy and offers to save what it finds (WWDC 2018 session 204: "Make
sure to only clear the username and password fields after they've been
removed from the view hierarchy. This way, we can read out the data and
save it into credential."). The item form, the Send form and the AutoFill
sheet's add-login form now empty their secret fields once the save went
through, wait a moment for the fields to update, and only then leave. The
fields stay SecureFields, so VoiceOver announces them as secure as before.

VaultFlowsUITests.expectNoSavePasswordPrompt fails again when the prompt
comes; AutofillUITests records whether it came after the add-login form.
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/keepiq @ ad85159

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
test-l10n ✅
format ✅
check-l10n-js ✅
check-schema-l10n ✅
composer ✅ ✅ 114/114
npm ✅ ✅ 660/660
app:check-code ⏭️
info.xml ✅
REUSE ✅
lockfile sync ✅
PHPUnit ❌
Newman ❌
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ✅

Quality workflow — 2026-10-05 22:10 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit 4aba930 into development Oct 6, 2026
57 of 61 checks passed
@rubenvdlinde
rubenvdlinde deleted the feat/mobile-ios-gaps branch October 6, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant