Conversation
- AccountsSettingsView (Settings → Account tab) with SIWA button + email/password toggle (Create Account / Sign In). - AccountManager: @observable, tracks currentUser + pendingAppleNonce; bootstrap() reads Keychain, calls /api/v1/me, clears on 401. - SyncAPI: URLSession client for /auth/apple, /auth/users, /auth/sessions, /auth/sessions/current, /api/v1/me. Bearer: "Authorization: Bearer <token>". - KeychainStore: thin Security.framework wrapper (save/read/delete). - Entitlement: com.apple.developer.applesignin on both .entitlements files. - project.yml: AuthenticationServices.framework dep on Clearly target. - ClearlyApp: AccountManager.shared injected into Settings scene; bootstrap() fires from init. Pairs with the server commit on sync-phase1 in the mumbai-v6 workspace (server/ Rails app + docs). Phase 1 goals verified locally: curl smoke passes against bin/rails server; Debug build green; no Phase-0 regressions. Real SIWA smoke test requires the Apple Developer portal SIWA capability enabled on com.sabotage.clearly + .dev App IDs (still Josh-side). Ref: docs/sync/PROGRESS.md Phase 1 in the workspace repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AccountManager(@Observable) trackscurrentUser+pendingAppleNonce;bootstrap()reads Keychain and calls/api/v1/meon launch.SyncAPIis a thin URLSession client against the Rails backend (/auth/apple,/auth/users,/auth/sessions,/auth/sessions/current,/api/v1/me). Bearer =Authorization: Bearer <Session.token>.KeychainStorewraps Security.framework for the session token.com.apple.developer.applesigninadded toClearly.entitlementsandClearly-AppStore.entitlements;AuthenticationServices.frameworkadded to the Clearly target inproject.yml.ClearlyAppinjectsAccountManager.sharedinto the Settings scene and kicks offbootstrap()frominit.Pairs with the Rails server work in clearlymd/clearly#10.
Test plan
xcodegen generate && xcodebuild -scheme Clearly -configuration Debug build— greenbootstrap()is doing its job)POST /auth/apple200 (noAppleIdentityToken::Unverified)Blockers (Josh-side)
com.sabotage.clearly+com.sabotage.clearly.devin the Apple Developer portal; regenerate provisioning profiles. Without this, the Debug build fails to code-sign; code itself is green (verified withCODE_SIGNING_ALLOWED=NO).