Universal Links

Hi,


I try to use universal Links see in WWDC Session (509)


I put my apple-app-site-association into my root website


{
    "applinks": {
        "apps": [],
        "details": {
            "SVNXXXXX.ch.myapp.myapp": {
                "paths": ["*"]
            }
        }
    }
}


I have activated associated domains and provide this file in my project :


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-/
<plist version="1.0">
<dict>
<key>com.apple.developer.associated-domains</key>
<array>
  <string>applinks:www.myapp.ch</string>
  <string>applinks:myapp.ch</string>
</array>
</dict>
</plist>


And into my delegate I have :


  func application(application: UIApplication, continueUserActivity userActivity: NSUserActivity, restorationHandler: ([AnyObject]?) -> Void) -> Bool {
    if userActivity.activityType == NSUserActivityTypeBrowsingWeb {
      let webURL = userActivity.webpageURL!
      print(webURL)
    }
    return true
  }


If I click to link with or without HTTPS and with or without www it's safari who is displayed, never app

Something I missing ?

Accepted Answer

You need to sign the json with your developer ID. Only in Beta 2 are they dropping the requirement for signing the json, as long as you're targetting an iOS 9 deployment. If you need to support iOS8, then you'll still need to sign the json file.

It works fine. Just a question. The universal work, but if I go inot website on safari, any link launch application. Any tips to avoid this behavior on safari ?

Wait, Apple dropping the requirement to sign the apple-app-site-association file with the certificate in beta 2? Do you have a link to any Apple docs that detail this change?

Just tried an unsigned apple-app-site-association in beta 2. It just opens in Safari--nothing gets called in the app.

It was mentioned in the WWDC video about universal links.

Sad, the json file is still need to be signed in beta3, please refer to "Safari" part.

Looks like it's still there in beta 4 as well. Has anyone been able to get this to work without signing the file? I tried changing my deployment target to 9.0 and this still doesn't work with an unsigned apple-app-site-association file.

I have also tried with signed JSON file, but it didn't work.

Did you success with signed JSON file?

I also tried with signed JSON (the file was signed with my iPhone Distribution certificate), but the URL is always opened in Safari.

Could you please see my question here: https://forums.developer.apple.com/thread/11948

I got it to work - turned out that my unsigned JSON file was missing a comma 😐

Did you make an unsigned JSON work? Can you please specify where is the missing comma? Is it in "details"? Thanks


"details": {

"xxxxxxx.com.xxxxxxx.app": {

"paths": ["*"]

},

}

Could you please share your JSON file?

Universal Links
 
 
Q