Last active
June 7, 2019 20:40
-
-
Save henning-jh/db2bc5c51328ebead86aca76a6c7396e to your computer and use it in GitHub Desktop.
Sign In with Apple: initial view login check
This file contains hidden or 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
/// Prompts the user if an existing iCloud Keychain credential or Apple ID credential is found. | |
func performExistingAccountSetupFlows() { | |
// Prepare requests for both Apple ID and password providers. | |
let requests = [ASAuthorizationAppleIDProvider().createRequest(), | |
ASAuthorizationPasswordProvider().createRequest()] | |
// Create an authorization controller with the given requests. | |
let authorizationController = ASAuthorizationController(authorizationRequests: requests) | |
authorizationController.delegate = self | |
authorizationController.presentationContextProvider = self | |
authorizationController.performRequests() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment