Apple's examples said to perform authorization attempt as soon as the login view appears using the code shown below. When the code runs I get this non-helpful error:
[core] Authorization failed: Error Domain=AKAuthenticationError Code=-7001 "(null)" UserInfo={AKClientBundleID=com.....SignInWithApple}
I do have something stored in the shared web credentials that it could be grabbing. Here's the code I'm using:
private func performExistingAccountSetupFlows() {
let requests = [
ASAuthorizationAppleIDProvider().createRequest(),
ASAuthorizationPasswordProvider().createRequest()
]
appleSignInDelegates = SignInWithAppleDelegates(window: window)
let controller = ASAuthorizationController(authorizationRequests: requests)
controller.delegate = appleSignInDelegates
controller.presentationContextProvider = appleSignInDelegates
controller.performRequests()
}
Have I missed a step here?
You can't run this code on a simulator. That's what the error is saying, even though it doesn't actually say that. If you run on a device it works properly.
So just wrap the code in an #if !targetEnvironment(simulator)
Try this: 1) Tap on the Apple Sign In button 2) Swipe up (lightly just so the App doesn't switch) the white bar on the bottom of the screen.
The pop up seem to be stuck sometimes, that's why doesn't show and this error logs.
It's weird right now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With