iPhone, iPad and Mac app (SwiftUI over UniFFI), several accounts #14
Loading…
Reference in a new issue
No description provided.
Delete branch "board/959-5d2672"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The first native Plaintext app: iPhone, iPad and Mac from one SwiftUI target, on UniFFI bindings over
plaintext-client. Board #959.Rust
ffi/crate: onePlaintextAppobject that holds any number of unlocked accounts, with one lock each, so a slow server only holds up its own account. It keeps each account's sealed vault snapshots and keyring in the app container, the same way the CLI does, so the rollback guard and pins survive restarts. Every record and call carries the account id, and items can move between accounts.#[uniffi(flat_error)]), so the RustDisplaytext is the message every app shows.server_addresschecks a typed address (http://only for localhost, private ranges, Tailscale,.local/.ts.net) andserver_infowraps/v1/info. The QR and link formats (device, verify, invite) are defined once in Rust.Session::offline,load_local/save_local,import, and HTTP timeouts, so a black-holed server falls back to the device copies instead of hanging.GET /v1/usersalso lists the caller's own agents. Before this, the Agents screen came up empty on a hosted server. Tested inhosted_server_and_several_servers.ffi/src/tests.rscovers the app API end to end over HTTP (signup, edits and history, attachments, move, 1PUX import, invite links, sharing, QR verify, inbox, links with a custom link page, agents, offline resume, new device).several_accountscovers a family server and a hosted one in one app.Apple (
apple/)build-rust.shbuildsPlaintextFFI.xcframeworkand the Swift bindings. SetPROFILE=devandTARGETS=...for quicker local builds and for CI./v1/info), the Emergency Kit PDF with a QR (save or print), and biometrics.<username>@<host> secret-key|session, and the session sits behind.userPresence. A Debug Mac build without a signing team can't use the data-protection keychain, so only Debug falls back to the login keychain (after the same Touch ID or password prompt); a protected session is never stored without its presence check..forgejo/workflows/apple.ymlruns on the Mac runner. It builds the XCFramework and runsbuild-for-testingfor macOS and the simulator. The runner can't start XCTest, so the unit tests and the Journey UI test (apple/screenshots.sh) run locally.Not in this PR: AutoFill, passkeys and the Safari extension (next ticket), and the Recently Deleted list (the core has no
trashedfield yet). Deleting has a 5-second undo instead.Review fixes (two independent Opus reviews, plus a check of the fixes)
forget): the device's snapshots, rollback guard and pins stay. Sign out of a locked account still deletes its copies.server_address, so plainhttp://to a public host is refused everywhere.members,users,sessions,audit,is_verified) don't persist.trust_inviterfrom main).verify_fingerprint).unlock_data).<id>.hidden.binand stay hidden offline (client test).ReadOnly) and hidden in the UI; a 5xx opens from the device copies like a network failure; a sign-in survives a failed first sync; a lock in the middle of a save reportsLockedinstead of losing the edit.Audit and third review round
These fix the security audit (all Highs and Mediums, and every Low) and the third review.
applyleaves files alone;remove_file). Names go throughsafe_file_name.Tamperedreads as a wrong password only when signing in or changing the password; elsewhere it says the data didn't check out.plaintext:URL scheme is gone. Invites are scanned or pasted in the create-account step ("I have an invite"), and sign-in codes come only from the in-app scanner.-allowProvisioningUpdateswith the ASC key). Both carrygroup.com.borodutch.plaintextand thecom.borodutch.plaintext.sharedkeychain group. The dev-cert keychainabsplus-devtesthas to be unlocked first, or codesign waits for a password prompt.Checked live on an iPhone SE simulator:
Rebased on main through #19 (and merges cleanly with #4).
apple/screenshots.shdrives the CLI throughexpect, since the CLI now keeps its session per terminal and asks for--password/--totp.Third review round (locking)
Known gaps are in board #986.
🤖 Generated with Claude Code
1601854604a939024c92