title: Why is apple sign-in with FirebaseUI not working?
body: <p>Following the guide <a href="https://firebase.google.com/docs/auth/ios/firebaseui" rel="nofollow noreferrer">here</a> 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:</p>
  <pre><code>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
  </code></pre>
  <p>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.</p>
  <p>Here is the code that triggers the login flow:</p>
  <pre><code>@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(&quot;Nice! You've signed in as \(user.uid)&quot;)
              performSegue(withIdentifier: K.welcomeSegue, sender: self)
          }
          print(error!)
      }
  </code></pre>
  <p>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?</p>
  <p><strong>Update</strong></p>
  <p>The <code>authUI</code> 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?</p>
  <p>The error appears to be occurring after I call the <code>present()</code> method.</p>
  <p><strong>Update 2</strong></p>
  <p>Full console output:</p>
  <pre><code>2020-12-11 13:53:55.697034-0500 Pikit[4563:85919] Task &lt;9849E252-C9AF-4F35-88A7-1946BD0B4270&gt;.&lt;2&gt; finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 &quot;A server with the specified hostname could not be found.&quot; UserInfo={_kCFStreamErrorCodeKey=8, NSUnderlyingError=0x6000006edec0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 &quot;(null)&quot; UserInfo={_kCFStreamErrorCodeKey=8, _kCFStreamErrorDomainKey=12}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask &lt;9849E252-C9AF-4F35-88A7-1946BD0B4270&gt;.&lt;2&gt;, _NSURLErrorRelatedURLSessionTaskErrorKey=(
      &quot;LocalDataTask &lt;9849E252-C9AF-4F35-88A7-1946BD0B4270&gt;.&lt;2&gt;&quot;
  ), 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: &lt;Error Domain=RBSAssertionErrorDomain Code=3 &quot;Target is not running or required target entitlement is missing&quot; UserInfo={RBSAssertionAttribute=&lt;RBSDomainAttribute| domain:&quot;com.apple.webkit&quot; name:&quot;Background&quot; sourceEnvironment:&quot;(null)&quot;&gt;, NSLocalizedFailureReason=Target is not running or required target entitlement is missing}&gt;
  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 &quot;Target is not running or required target entitlement is missing&quot; UserInfo={RBSAssertionAttribute=&lt;RBSDomainAttribute| domain:&quot;com.apple.webkit&quot; name:&quot;Background&quot; sourceEnvironment:&quot;(null)&quot;&gt;, 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;
      &quot;is_weak_match&quot; = 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
  </code></pre>
  <p>I have tried multiple different methods and read through the documentation many times but still cannot see what I am doing wrong.</p>
  <p><strong>Update 3</strong></p>
  <p>I have tried replacing each of the certificates/ keys and regenerating new ones with no effect</p>
  <p>This is where I have been getting stopped in the sign-in flow:
  <a href="https://i.stack.imgur.com/USt36.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/USt36.png" alt="Here is the part of sign-in that my app gets stuck on" /></a></p>
  <p><strong>Update 4</strong></p>
  <p>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 <code>authUI()</code> function is not being triggered.</p>