Skip to content

Conversation

@Sajjon
Copy link

@Sajjon Sajjon commented Nov 23, 2025

Note

Work is based on source branch of #7 so merge that before
but since I'm creating PRs from my fork I cannot select that source branch (my fork) as target branch here
to get proper git diff. I.e. if/after #7 is merged we can see proper diff.

Minor updates the Swift SDK and some updates to the Demo app so that it compiles and runs in Swift Language Version: 6 with strict concurrency fixes.

Note

This is mostly a patch, both the SDK and the Demo app would really benefit from a larger refactoring (drop usage of classes in favour of structs for dependencies like API clients, and be implemented using swift-dependencies for testability and safe sendability)

Also made functions ought to be made throwing with at least some crude error handling and force unwrap ought to be
removed (demo app crashes if no server is running).

Changes

  • Demo app now compiles and runs with SWIFT_STRICT_CONCURRENCY = complete; and SWIFT_VERSION = 6.0; this is not a full migration/upgrade, this fix is a patch relying on @unchecked Sendable.
  • Views no longer hold @ObservedObject properties, since UserConfig and MyBusinessLogic classes have been upgraded to use Observation frameworkss macro @Observable
  • Changed stored properties holding var to let - in Swift a property need not be var if the type is a class, not for mutation of values inside said property.
  • For cases where mutation need to happen on a @observed class @Binding can be used (e.g. DelegatedLoginView hold a @Binding var userConfig: UserConfig since the view need to be able to write to the email of userConfig, else we can just pass the type as a reference without @Binding property wrapper
  • Isolated MyBusinessLogic, MyServer to @MainActor in demo
  • Isolated PasskeysSigner in SDK to @MainActor

Demo

I'm running a node server as per and using ngrok and the code works in Simulator on Xcode 26.1

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-11-23.at.11.39.36.mov

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