How to setup Web Browser–to–Native App Handoff in iOS 8

1.2k views Asked by At

I am trying to setup Web Browser–to–Native App Handoff but not having any luck. I am sure I am just missing a step. Here is what I have done

  1. Updated my bundleId with the Associated Domains option and generated new provisioning profiles on the dev site
  2. In Xcode added my domains to the Associated Domains list on the Capabilities tab
  3. Created the json.txt file with my bundleId including the team identifier
  4. Singed the json.txt file with the key and cert I use for https
  5. Uploaded the apple-app-site-association file to the root of the site

I already have Native App-to-Native App Handoff and Native App–to–Web Browser Handoff working. What am I missing?

This is the only documentation I have been working off of.

https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/Handoff/AdoptingHandoff/AdoptingHandoff.html#//apple_ref/doc/uid/TP40014338-CH2-SW10

2

There are 2 answers

0
Richard On

Have this issue too, with the bonus of also getting Universal Links to work in iOS 9. Tried everything above, and still failed to get it working reliably.

It seems to be slow to pick up the native option over the browser continuation option.

It also seems to be slow to renew the cache of the apple-app-site-association, so you can change it and not see any change for a while.

One quirk: it looks like Universal Links return activity.webpageURL.host as "www.example.com" whereas handoff returns "example.com".

Update: It works MUCH better if you use Safari as the browser instead of Chrome. Picks up the handoff much quicker & more reliably.

0
Lefteris On

We had the same issue and spent quite a few hours to solve this.

We managed to get this solved, by adding to our JSON file the activitycontinuation key.

In the end this is how our json looks:

{ 
  "webcredentials": {
    "apps": ["TeamID.bundleIdentifier"]
  },
  "activitycontinuation": {
    "apps": ["TeamID.bundleIdentifier"]
    }
}

Make sure to validate your json always (try jsonlint.com for that) as an invalid json can easily be the reason for errors and issues.