This creates a basic iOS/macOS (/tvOS/visionOS?) SDK for integrating SnapAuth.
So far:
Registration seems to work
Model authentication seems to work
Autofill authentication DOES NOT work (I can't find anything wrong logically, but the UI in the test app glitches out and gets console warnings when it's given the appropriate hint)
It's been tested on-device for macOS and iOS, and in simulators for visionOS (seems ok-ish given the limitations) and tvOS (basically non-functional, but I think this is a simulator problem)
Logging is a hot mess, error handling needs (a lot of) work, and a lot of the internal names are pretty goofy. I'll file issues for all of that.
BUT the core integration experience is pretty decent:
Initialize with a publishable key
Implement (and set) a delegate
Call one of the two (three?) main APIs
Get your callback
I'd prefer a more direct async/await approach, but this is probably the more native experience and trying to work through threading the ASAuthorization callbacks back into async/await is probably not a good time.
Specifically with loading it like this in SwiftUI and a single view, it's a bit error-prone, since you can easily forget to bind the delegate - and then everything silently fails.
There are also some Apple bugs where the internal ASAuthorization delegate methods aren't called in some failure scenarios, and the whole domain linking process is a pain. They're a bit tricky to repro but I'll file radars for all of them once I get it figured out.
This creates a basic iOS/macOS (/tvOS/visionOS?) SDK for integrating SnapAuth.
So far:
It's been tested on-device for macOS and iOS, and in simulators for visionOS (seems ok-ish given the limitations) and tvOS (basically non-functional, but I think this is a simulator problem)
Logging is a hot mess, error handling needs (a lot of) work, and a lot of the internal names are pretty goofy. I'll file issues for all of that.
BUT the core integration experience is pretty decent:
I'd prefer a more direct async/await approach, but this is probably the more native experience and trying to work through threading the
ASAuthorization
callbacks back into async/await is probably not a good time.Specifically with loading it like this in SwiftUI and a single view, it's a bit error-prone, since you can easily forget to bind the delegate - and then everything silently fails.
There are also some Apple bugs where the internal ASAuthorization delegate methods aren't called in some failure scenarios, and the whole domain linking process is a pain. They're a bit tricky to repro but I'll file radars for all of them once I get it figured out.