I am setting up my apple-app-site-association file follow this tutorial: http://techlife.cookpad.com/entry/2014/12/11/093000
But it does not work.
I setup a free hosting site and upload the apple-app-site-association file onto the root of website: http://universallink.net46.net/apple-app-site-association
1. I created a JSON file and named it handoff.json:
{
"applinks":
{
"apps":[],
"details":
{
"XXXXXXXXXX.com.home.universallinks":
{
"paths":["*"]
}
}
}
}
The XXXXXXXXXX here is the team id of the Development provisioning profile (not the distribution one)
2. I used Keychain Access app to export a iPhone developerment certificate to a Certificates.p12 key.
3. I signed the JSON file with these commands:
Create a certificate in the openssl command.
openssl pkcs12 -in Certificates.p12 -clcerts -nokeys -out output_crt.pem
Create a secret key.
openssl pkcs12 -in Certificates.p12 -nocerts -nodes -out output_key.pem
Create an intermediate certificate.
openssl pkcs12 -in Certificates.p12 -cacerts -nokeys -out sample.ca-bundle
Sign the handoff.json file with the following command.
cat handoff.json | openssl smime -sign -inkey output_key.pem -signer output_crt.pem -certfile sample.ca-bundle -noattr -nodetach -outform DER> apple-app-site-association
4. I uploaded the signed file "apple-app-site-association" onto the root of website: http://universallink.net46.net/apple-app-site-association
5. I configured the entitlement:
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:universallink.net46.net</string>
<string>applinks:www.universallink.net46.net</string>
</array>
</dict>
6. I implement the function application:continueActivity.... and return YES.
7. I installed the app on the iOS 9 beta 4 device and also installed the Certificates.p12 at step 3 into the device.
8. I sent a message to myself: http://universallink.net46.net
9. I expected my app would be launched but actually, it was Safari.
I don't know if I did something wrong.