5

For authentication in my iOS application, I want to use the Apple Shared Web Credentials feature.

I have put an associated domain file on my website. This file is accessible under the path https://subdomain.domain.com/.well-known/apple-app-site-association and has the following content:

{
  "webcredentials": {
    "apps": [
      "XXXXXXXX.demo.App"
    ]
  }
}

I enabled the Associated Domains capability in my iOS application and added the following entry there:

webcredentials:subdomain.domain.com

enter image description here

Now I build and launch the application and get the login screen. As soon as I enter the login data there and submit, I get the following error:

Application with identifier XXXXXXXX.demo.App is not associated with domain subdomain.domain.com

Does the iOS application use the configured associated domain to make the query of the file on the web server? What exactly am I missing here?

Christoph
  • 1,113
  • 5
  • 17
  • 35

1 Answers1

-1

Kindly note some points in order to make it work :

  • that you must replace XXXXX with your teamId from your apple developer account, and other part is you bundle identifier.
  • Apple’s content delivery network requests the apple-app-site-association file for your domain within 24 hours. Devices check for updates approximately once per week after app installation, so you may require re-install the app after any edits to the apple-app-site-association file.
  • you may have to enable (autofill credential provider) capability in order to use credentials in authFillPassword ui.
  • set the attribute textContentType to make system identify the input as (username,email, passsord .... etc).

References: https://developer.apple.com/documentation/xcode/supporting-associated-domains#Add-the-associated-domains-entitlement-to-your-app

https://developer.apple.com/documentation/security/password_autofill

Amer Alzibak
  • 1,489
  • 15
  • 16