Universal link support on iOS 9

I am trying to set up Universal link functionality for my iOS app. Spent almost more than a day, the link always launches in Safari rather than in my application.


OS version : iOS9

apple-app-site-association (unsigned file) content:

{

"applinks": {

"apps": [],

"details": [

{

"appID": "3XSXXXXX.com.xxxx.myapp",

"paths": [ "*"]

}

]

}

}


The above file is available at the https://myserver.com/apple-app-site-association.


Here is the response headers for file.


HTTP/1.1 200 OK

Server: Apache-Coyote/1.1

Set-Cookie: JSESSIONID=EE8469FED2544A965E30A9CB1776368C; Path=/; Secure; HttpOnly

Set-Cookie: ACEGI_SECURITY_HASHED_REMEMBER_ME_COOKIE=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; HttpOnly

Set-Cookie: ut=jPC24b1ghCjIRWxAG3tw5Aru5ALLIE9tJBCOv-DLVOE; Expires=Fri, 20-Oct-2017 22:56:44 GMT; Path=/; HttpOnly

Set-Cookie: SESSION_TOKEN=WBre4NJuzIjhqrR68hxFxLmLHd32LQoC5SKFlywfRdE; Expires=Fri, 20-Oct-2017 22:56:44 GMT; Path=/; HttpOnly

Accept-Ranges: bytes

ETag: W/"201-1448058739000"

Last-Modified: Fri, 20 Nov 2015 22:32:19 GMT

Content-Length: 201

Date: Fri, 20 Nov 2015 22:56:44 GMT



Entitlement file:


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

<key>com.apple.developer.associated-domains</key>

<array>

<string>applinks:myserver.com</string>

</array>

</dict>

</plist>


Implemented Delegate API call. It never calls AppDelegate at all. Anyone is able to sucessfully launching the app. I did followed other forum links, have followed the exact steps so far no luck. Any suggestions please.

A couple suggestions/comments/ideas:


  • If you do a "curl -v https://myserver.com/apple-app-site-association" in Terminal, does the Content-type show as application/json?
  • Your myserver.com is accessible from the iOS device, right? Just to make sure, if you're doing something on a private server that's not available to the outside world then you'd need to make sure your iOS device is on the same private network.
  • If all that looks good, double check that on a page that should be directing to the app, pull down on that page to see if there's a banner there that would let you open it in the app. A few folks have gotten stuck in this situation where the OS has switched your domain over to prefering Safari (typically using the forward breadcrumb in the top right corner of the screen after having opened a universal link) and you need to switch it back.
  • Also, just to double check: where are you opening links from? You would want to be tapping on a link from Mail or Notes or somewhere other then typing it into the address field in Safari since doing that will always open the link in Safari.
Universal link support on iOS 9
 
 
Q