Here's my setup:
- I have an AWS CloudFront distribution with custom and valid SSL certificate (from ACM)
- the CF distribution points to an S3 bucket
- My domain example.com is a A record with alias to my CF distribution
- I uploaded apple-app-site-association and .well-known/apple-app-site-association to my bucket with the following parameters: Public Read, Content-Type=application/pkcs7-mime
My apple-app-site-association is as follows:
{
"webcredentials": {
"apps": [ "TeamID.BundleId1",
"TeamID.BundleId2" ]
}
}
Of course the values are replaced with my team's ID and the bundle Ids of my 2 apps.
When I run
curl -i https://example.com/apple-app-site-association
or
curl -i https://example.com/.well-known/apple-app-site-association
I have the following result:
HTTP/2 200
content-type: application/pkcs7-mime
content-length: 156
date: Wed, 18 Dec 2019 03:08:15 GMT
last-modified: Wed, 18 Dec 2019 03:04:14 GMT
etag: "redacted"
x-amz-server-side-encryption: AES256
accept-ranges: bytes
server: AmazonS3
x-cache: Miss from cloudfront
via: 1.1 redacted.cloudfront.net (CloudFront)
x-amz-cf-pop: redacted
x-amz-cf-id: redacted
{
"webcredentials": {
"apps": [ "TeamID.BundleId1",
"TeamID.BundleId2" ]
}
}
Which tells me the file is valid and correctly hosted.
On the Xcode side, my target has the following row in Signing & Capabilities > Associated Domains:
webcredentials:example.com
So my entitlements file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.associated-domains</key>
<array>
<string>webcredentials:example.com</string>
</array>
</dict>
</plist>
However when I go to my Sign Up screen on the app, I have the following console log:
[AutoFill] Cannot show Automatic Strong Passwords for app bundleID: BundleId due to error: Cannot save passwords for this app. Make sure you have set up Associated Domains for your app and AutoFill Passwords is enabled in Settings
I am testing on a real device on iOS 13 and AutoFill is enabled.
Note: my app is not live yet (in case I am advised to use the Apple crawler aka App Search API Validation Tool)
Thanks in advance for any help!