Search code examples
iosios9ios-universal-links

Universal Links on private LAN


I'm trying to make Universal Links work in my app as a replacement of URL Schemes, because since iOS 9 it looks like the system is displaying an alert dialog everytime an app is invoked from Safari. I was hoping that replacing the URL scheme call for a registered URL path in Associated Domains while using Universal Links was going make the dialog disappear.

So instead of calling myscheme://app?params=values I would call https://example.com/universal-link/wakeup?params=values.

My apple-app-site-association (unsigned) file looks like this

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "XXXXXXXX.com.company.appid",
                "paths": [ "/universal-link/*" ]
            }
        ]
    }
}

Please note that, for now, I am using a webserver hosted in the company's LAN, it is not a public server on the Internet. So in the app capability "Associated Domains" I wrote something like applinks:host.company.lan:7700, yet the apple-app-site-association file is never fetched after the app first starts.

I don't know what else to try, so I am considering the server being in a private network might be an issue.


Solution

  • I've found this question in the Apple developer forum that sheds some light on this.

    Looks like the issue is, the apple-app-site-association hosted by a domain signed by an untrusted root, and doesn't matter if you install your root certificate in the system, it won't download either. I assume it must be signed by a CA already included in iOS by default.