Handoff and Universal Links failed on iOS 9

I am setting up my apple-app-site-association file following this : Transfer of service works on iOS 8, but transfer of service does not work on iOS 9. I set up a free hosting site and upload the apple-app-site-association application file to the root site directory: universallink.net46.net 1. I created a JSON file and named it handoff.json:

{
    "activitycontinuation": 
    {
        "apps": ["XXXXXXXXXX.com.home.handoff"]
    }, 
    "applinks":
    {
        "apps":[],
        "details":
        {
            "XXXXXXXXXX.com.home.handoff":
            {
                "paths":["*"]
            }
        }
    }
}

      

XXXXXXXXXX here is the command ID of the distribution grant profile

  1. I used Keychain Access app to export iPhone distribution certificate to Certificates.p12 key.
  2. I signed the JSON file using the following commands:

Create certificate in 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

      

  1. I have uploaded the signed file "apple-app-site-association" to the root of the universalallink website
  2. I configured the right:
<dict>
  <key>com.apple.developer.associated-domains</key>
  <array>
      <string>activitycontinuation:www.universallink.net46.net</string>
      <string>activitycontinuation:universallink.net46.net</string>
      <string>applinks:www.universallink.net46.net</string>
      <string>applinks:universallink.net46.net</string>
  </array>
</dict>

      

  1. I am implementing the function app: continueActivity .... and it returns YES.
  2. I installed the app on an iOS 9 beta 4 device and also installed Certificateates.p12 in step 3 on the device.
  3. I sent a message to myself a link to the site allallink
  4. I expected the application to launch, but it is actually Safari.

I don't know if I did anything wrong.

0


source to share


3 answers


You are signing it wrong. You need

and a key for an identity issued by a CA trusted by iOS



See the official apple documentation here: https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/Handoff/AdoptingHandoff/AdoptingHandoff.html#//apple_ref/doc/uid/TP40014338-CH2- SW10

+2


source


I think:

 "details":
        {
            "XXXXXXXXXX.com.home.handoff":
            {
                "paths":["*"]
            }
        }

      



Should be:

   "details": [{
        "appID": "XXXXXXXXXX.com.home.handoff",
        "paths": ["*"]
     }]

      

+1


source


I tried to get it to work using a local server (python https OTA server) with a self-provisioned certificate using SSL and it didn't work. I could track the connection and listen to the channel, but in the various tests I tried, the json file was never requested, so there is a problem, SSL certificate. Go to: https://support.apple.com/en-gb/HT205205 , as "not all root certificates" are supported by apple (most are though).

0


source







All Articles