Following the guide here I am attempting to add Apple sign-in to my iOS app. I have successfully implemented google sign-in with this method but Apple does not seem to be working. I can get to the point where it asks for my apple password but then it just keeps loading without result and I get the following errors:
2020-12-10 13:19:38.020129-0500 Pikit[5268:114225] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2020-12-10 13:19:38.121991-0500 Pikit[5268:114225] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service
To be clear these errors appear after I have selected to share my email with the app and before actually entering a password. If I type an incorrect password then it informs me, but if I type the correct password it does not proceed. It does not hang, it simply will not continue with no explanation.
Here is the code that triggers the login flow:
@IBAction func loginPressed(_ sender: UIButton) {
let authUI = FUIAuth.defaultAuthUI()
guard authUI != nil else {
return
}
authUI?.providers = [
FUIEmailAuth(),
FUIGoogleAuth(),
FUIOAuth.appleAuthProvider()
]
authUI?.delegate = self
let authViewController = authUI!.authViewController()
authViewController.modalPresentationStyle = .overCurrentContext
self.present(authViewController, animated: true, completion: nil)
}
//This function is not being triggered
func authUI(_ authUI: FUIAuth, didSignInWith authDataResult: AuthDataResult?, error: Error?) {
if let user = authDataResult?.user{
print("Nice! You've signed in as \(user.uid)")
performSegue(withIdentifier: K.welcomeSegue, sender: self)
}
print(error!)
}
I have also made sure my Firebase project has enabled Apple, that apple sign-in is in my entitlements, and that I have uploaded my iOS auth key. I am running this on a simulator, does it need to be run from a real device?
Update
The authUI function is not running at all as I have tried inserting a print statement outside of the conditional and received no output. Why would this not be running?
The error appears to be occurring after I call the present() method.
Update 2
Full console output:
2020-12-11 13:53:55.697034-0500 Pikit[4563:85919] Task <9849E252-C9AF-4F35-88A7-1946BD0B4270>.<2> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=8, NSUnderlyingError=0x6000006edec0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <9849E252-C9AF-4F35-88A7-1946BD0B4270>.<2>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <9849E252-C9AF-4F35-88A7-1946BD0B4270>.<2>"
), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=AIzaSyDAKtfpyKw0QG5Db9jtdHYQfAOgI-FASWE, NSErrorFailingURLKey=https://firebasedynamiclinks-ipv6.googleapis.com/v1/installAttribution?key=AIzaSyDAKtfpyKw0QG5Db9jtdHYQfAOgI-FASWE, _kCFStreamErrorDomainKey=12}
2020-12-11 13:53:55.733365-0500 Pikit[4563:85634] [assertion] Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}>
2020-12-11 13:53:55.733582-0500 Pikit[4563:85634] [ProcessSuspension] 0x1098fed80 - ProcessAssertion: Failed to acquire RBS Background assertion 'WebProcess Background Assertion' for process with PID 4565, error: Error Domain=RBSAssertionErrorDomain Code=3 "Target is not running or required target entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"Background" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}
2020-12-11 13:53:55.977723-0500 Pikit[4563:85800] 6.25.0 - [Firebase/Messaging][I-FCM012002] Error in application:didFailToRegisterForRemoteNotificationsWithError: remote notifications are not supported in the simulator
2020-12-11 13:53:56.045387-0500 Pikit[4563:85800] 6.25.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-12-11 13:53:56.227368-0500 Pikit[4563:85800] 6.25.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-12-11 13:53:56.282593-0500 Pikit[4563:85800] 6.25.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled
2020-12-11 13:53:56.355765-0500 Pikit[4563:85824] 6.25.0 - [Firebase/Analytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
dismiss = 1;
"is_weak_match" = 1;
}
2020-12-11 13:54:25.474653-0500 Pikit[4563:85634] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service
2020-12-11 13:54:25.749707-0500 Pikit[4563:85634] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service
I have tried multiple different methods and read through the documentation many times but still cannot see what I am doing wrong.
Update 3
I have tried replacing each of the certificates/ keys and regenerating new ones with no effect
This is where I have been getting stopped in the sign-in flow:

Update 4
It appears that the error noted above does not occur after signing in, but is unrelated. When logging in I do not get any error. I do not understand why the authUI() function is not being triggered.