snapauthapp / sdk-swift

Swift SDK for SnapAuth (all Apple platforms)
https://www.snapauth.app
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Pull error conversion out into an extension to simplify controller #32

Closed Firehed closed 2 months ago

Firehed commented 2 months ago

We encapsulate the ASAuthenticationError.Code values into our own SnapAuthError format. This change moves the conversion outside of the AS delegate callback into an extension defined near our own error codes. Doing so encourages a single source of truth in case future functionality requires a similar conversion in a different path.

It also adds support for a newly-defined case in iOS 18 and same-year equivalents.