Configure your app and website to support universal links.
By creating a two-way association between your app and your website, you can enable universal links as well as take advantage of other services, such as shared web credentials and Handoff.
Take the following steps to associate your app and website for universal links:
Add an Apple App Site Association file to your website. See Add the Apple App Site Association File.
applinkskey to the Apple App Site Association file. Specify the sections of your website each of your apps will handle.
Add Universal Links Support to Your Association File
To support universal links in the Apple App Site Association file, add an
applinks key contains the following keys:
This key is not used for universal links, but it must be present and set to an empty array, as shown in Listing 1.
A list of apps handling universal links for your website, along with the specific sections of your website each app handles.
Add the value of the
details key as a JSON representation of an array of dictionaries, one dictionary per app. For each app-specific dictionary, include an
The identifier of the application that will handle the links in the format
<team identifier>.<bundle identifier>.
The sections of your website supported by the app specified as an array of path strings.
Use Wildcards and Directives in Your Path Strings
Use wildcards in path strings within the
paths array to specify sections of your website. For example, append
* to a specific URL, such as /
videos/samples/2015/*, to specify all paths below /
? to match any single character, such as
/photography/*/samples/201?/mypage. Use a standalone
* to specify your entire website.
The order of the dictionaries in the array determines the order the system follows when looking for a match. The first match wins, allowing you to designate one app to handle specified paths within your website, and another app to handle the rest.
Identify an area that should not be handled by adding
“NOT ” (including a space after the T) to the beginning of the path string. For example, the Apple App Site Association file shown in Listing 1 could prevent the
/videos/samples/2010/* area of the website from being handled by updating the paths array as shown here:
For more information on creating and validating an Apple App Site Association file, see Setting Up an App’s Associated Domains.