Understanding associated domain services and creating custom associated domain services

839 views Asked by At

I've been doing a fair amount of research on universal links, handoff and associated domains on iOS. However, a lot of the documentation does go in depth of what is really happening under the hood with regards to associated domains (Well I couldn't find the documentation).

Here is what I understand so far:

Based the Universal Links, Hand off and Sharing web credentials documentation we have the following format when it comes to an associated domain:

<service>:<fully qualified domain>[:port number]

So when using universal links, the service isapplinks. When using hand off the service is activitycontinuation. When sharing of web credentials the service is webcredentials.

Whenever an app is downloaded theapple-app-site-association file is downloaded and stored on the phone and a registry is kept. For example lets work now with Universal Links.

Lets say my app in its associated domains section registers: applinks:com.example. Now lets say that when I get a link in an email that is www.example.com and I press this, I assume that the OS on the phone first checks the registry of all the applinks saved on the device and because a given app registers to com.example it then simply routes the URL to the given app that registered the com.example associated domain.

Question 1:Is this intuition correct?

If this is the case, I can't see any issue as a developer by creating my own web service i.e. mySpecialService:<Some-Domain> and in my apple-app-site-association file have something like:

{
   "mySpecialService": {
       "apps": [    "D3KQX62K1A.com.example.DemoApp",
                    "D3KQX62K1A.com.example.DemoAdminApp" ]
    }
} 

Question 2: Can developers create their own associated domain services? Or are associated domain services reserved by Apple?

0

There are 0 answers