Implementing SWA delegates in specific class
This file contains 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
public func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { | |
// Call didFetch(authorizationCredential:) | |
} | |
//To test didFetch(authorizationCredential:), mock ASAuthorizationAppleIDCredentialProtocol and | |
//assert that your delegate is being called properly | |
func didFetch(authorizationCredential: ASAuthorizationAppleIDCredentialProtocol) { | |
let credential = mapCredential(from: authorizationCredential) | |
delegate?.didCompleteWith(credential: credential) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment