1

I try to implement Web-to-Native handoff for my iOS app. I uploaded my apple-app-site-association file and it seems OK:

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "XXXXXX.com.myapp",
                "paths": [ "/*" ]
            }
        ]
    },
    "webcredentials": {
       "apps": [ "XXXXXX.com.myapp" ]
    },
    "activitycontinuation": {
        "apps": [ "XXXXXX.com.myapp" ]
    }
}

Universal links and web credentials both work just fine, but Handoff doesn't. When I open my URL in Safari on macOS, my iOS device shows handoff for Safari, not for my app. I double-checked my code, I do have all entries in entitlements, like

activitycontinuation:alpha.mysite.com

I also tried

activitycontinuation:*.mysite.com
activitycontinuation:mysite.com

I implemented -application:continueUserActivity:restorationHandler: method, and even added these lines in my plist:

<key>NSUserActivityTypes</key>
<array>
    <string>NSUserActivityTypeBrowsingWeb</string>
</array> 

But iOS still shows Safari in handoff, not my app.

This is what I found in device console log:

Dec  8 19:30:04 iPad-Valentine-2 swcd(CoreUtils)[255] <Notice>: Trying add of app ID 'XXXXXX.com.myapp' for get info
Dec  8 19:30:04 iPad-Valentine-2 swcd(CoreUtils)[255] <Notice>: ### Add service '<<NULL>>', app ID 'XXXXXX.com.myapp', domain '<<NULL>>' failed: -6727/0xFFFFE5B9 kNotFoundErr

But I can't find out what does that mean.

silvansky
  • 2,426
  • 2
  • 19
  • 20
  • Have you tried deleting app completely and retrying? Sounds stupid but it will clear the cache that says hand off for 'x.x.x' links should be handled on safari and iOS will rescrape the domain for apple-app-site file and hopefully be handled by app. – NSGangster Dec 08 '17 at 17:24
  • I tried reinstalling, but it didn't help. I also tried installing the app on a completely new device. – silvansky Dec 11 '17 at 08:32

0 Answers0