Application with identifier <team-id.com.example.bundle-id> is not associated with domain <www.example-domain.com>

1.6k views Asked by At

I'm developing a native library for iOS which is ment to be used for Single Sign On. I need to share credentials with a backend service, for which I followed this steps: (According to FIDO2 standard and this example)

1. I enabled Associated Domains in my application

enter image description here

2. Backend service hosted the /.well-known/apple-app-site-assiciation.json

{
  "webcredentials": {
    "apps": [
      "<TEAM-ID>.<com.example.bundle-id>"
    ]
  }
}

The error I'm getting:

Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1004 "Application with identifier P896AB2AMC.com.trust.testsso is not associated with domain cerberus.trust.lat" UserInfo={NSLocalizedFailureReason=Application with identifier P896AB2AMC.com.trust.testsso is not associated with domain cerberus.trust.lat}
error in connection_block_invoke_2: Connection interrupted

I don't know exactly what I'm missing.

1

There are 1 answers

1
Jan Gerle On BEST ANSWER

It seems you got the site-association a bit wrong. The correct URL is https://<fully qualified domain>/.well-known/apple-app-site-association - you are using ...apple-app-site-association.json. Strip off the .json at the end, then you should be good to go.

For a full explanation see https://developer.apple.com/documentation/xcode/supporting-associated-domains