Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Implementing SWA delegates in specific class
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