Credential Provider Extension UI Appears Only on Second “Continue” Tap

I’m having an issue with my Credential Provider Extension for passkey registration. On the browser I click on registration, in IOS i can select my App for passkey registration with a continue button. Wenn I click the continue button the prepareInterface(forPasskeyRegistration:) function is called but the MainInterface is not shown —it only appears when I click the continue button a second time.

Here’s a simplified version of my prepareInterface method:

override func prepareInterface(forPasskeyRegistration registrationRequest: ASCredentialRequest) {
    guard let request = registrationRequest as? ASPasskeyCredentialRequest,
          let identity = request.credentialIdentity as? ASPasskeyCredentialIdentity else {
        extensionContext.cancelRequest(withError: ASExtensionError(.failed))
        return
    }
    self.identity = identity
    self.request = request
    log.info("prepareInterface called successfully")
}

In viewDidAppear, I trigger FaceID authentication and complete the registration process if register is true. However, the UI only shows after a second “Continue” tap.

Has anyone encountered this behavior or have suggestions on how to ensure the UI appears immediately after prepareInterface is called? Could it be a timing or lifecycle issue with the extension context?

Thanks for any insights!

One possible cause of an issue like this is not setting the view up correctly in the normal view lifecycle methods. I would take a look at how you're setting things up in methods like viewDidLoad() and viewDidAppear(), making sure you have drawn something and are calling the super versions of those methods.

Credential Provider Extension UI Appears Only on Second “Continue” Tap
 
 
Q