You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for sharing this amazing project. However I'd like to make a suggestion.
Even in Swift 4 it's recommended to prefer Data over NSData but in Swift 5 it became still more comfortable. You can replace the authorizationRef(fromExternalForm method with
static func authorizationRef(fromExternalForm data: Data) throws -> AuthorizationRef? {
// Create an AuthorizationExternalForm from it's data representation
var authRef: AuthorizationRef?
var authRefExtForm = data.withUnsafeBytes{ $0.load(as: AuthorizationExternalForm.self) }
// Extract the AuthorizationRef from it's external form
try executeAuthorizationFunction { AuthorizationCreateFromExternalForm(&authRefExtForm, &authRef) }
return authRef
}
The text was updated successfully, but these errors were encountered:
Thank you for sharing this amazing project. However I'd like to make a suggestion.
Even in Swift 4 it's recommended to prefer
Data
overNSData
but in Swift 5 it became still more comfortable. You can replace theauthorizationRef(fromExternalForm
method withThe text was updated successfully, but these errors were encountered: