Skip to content

Instantly share code, notes, and snippets.

@henning-jh
Last active June 7, 2019 20:40
Show Gist options
  • Save henning-jh/db2bc5c51328ebead86aca76a6c7396e to your computer and use it in GitHub Desktop.
Save henning-jh/db2bc5c51328ebead86aca76a6c7396e to your computer and use it in GitHub Desktop.
Sign In with Apple: initial view login check
/// 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