I am trying to implement Sign in With Apple with SwiftUI, but it hangs after I enter the correct password.
I am using a real user and the simulator and XCode 12.0 Beta. Unfortunately, I do not have a device available right now to test on. I also tried with Sandbox users without success.
I have added the sign in with apple capability to the provisioning profile
The print statement for success is never reached.
What am I missing?
Using the sample code from https://developer.apple.com/documentation/swiftui/signinwithapplebutton
import SwiftUI
import AuthenticationServices
struct SignInView: View {
var body: some View {
VStack {
SignInWithAppleButton(
.signIn,
onRequest: { request in
request.requestedScopes = [.fullName]
},
onCompletion: { result in
switch result {
case .success (let authResults):
print("rhe01 Authorization successful.")
case .failure (let error):
print("rhe01 Authorization failed: " + error.localizedDescription)
}
}
)
}
}
}
This was a bug in the Simulator that was introduced in Xcode 12.0b1 - see this thread on Apple's forums. The good news is that this has now been fixed in Xcode 14, which is in beta as of this writing.
[UPDATE 2022-05-13] Tested and still not working in Xcode 13.4 RC (13F17a) with the following Simulator versions:
[UPDATE 2022-03-13] Tested and still not working in Xcode 13.3 (13E113) with the following Simulator versions:
[UPDATE 2022-01-27] Tested and still not working in Xcode 13.3 beta (13C90) with the following Simulator versions:
[UPDATE 2021-12-07] Tested and still not working in Xcode 13.2 RC (13C90) with the following Simulator versions:
[UPDATE 2021-10-18] Tested and still not working in Xcode 13.1 RC (13A1030d) with the following Simulator versions:
[UPDATE 2021-09-14] Tested and still not working in Xcode 13 RC (13A233) with the following Simulator versions:
[UPDATE 2021-06-30] Tested and still not working in Xcode 13 beta 2 (13A5155e) with the following Simulator versions:
[UPDATE 2021-06-08] Tested and still not working in Xcode 13 beta 1 (13A5154h) with the following Simulator versions:
[UPDATE 2021-04-22] Tested and still not working in Xcode 12.5 RC (12E262) with the following Simulator versions:
[UPDATE 2021-01-22] Tested and still not working in Xcode 12.4 RC (12D4e) with the following Simulator versions:
[UPDATE 2020-11-16] Tested and still not working in Xcode 12.2 RC (12B45b) with the following Simulator versions:
[UPDATE 2020-10-22] Tested and still not working in Xcode 12.2 beta 3 (12B5035g) with the following Simulator versions:
[UPDATE 2020-10-15] Tested and still not working in Xcode 12.1 GM Seed with the following Simulator versions:
[UPDATE 2020-09-29] Tested and still not working in Xcode 12.2 beta 2 with the following Simulator versions (no surprise - same versions as beta 1):
[UPDATE 2020-09-18] Tested and still not working in Xcode 12.2 beta with the following Simulator versions:
[UPDATE 2020-09-15] Still(!) not fixed in Xcode 12.0 GM Seed, with the following Simulator versions:
[UPDATE 2020-08-26] Still not fixed in Xcode 12b6 (it actually seems like Apple didn't update the Simulator between b5 and b6 - both drops show the following versions:
[UPDATE 2020-08-18] This is still an issue in Xcode 12b5. I've updated FB8281892 accordingly.
[UPDATE 2020-08-06] This is still an issue with Xcode 12b4. I've filed FB8281892 with details.
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