Contents

applinks

The root object for a universal links service definition.

Declaration

object applinks

Properties

NameTypeDescription
defaultsapplinks.Defaults
details[applinks.Details]
substitutionVariablesapplinks.SubstitutionVariables

Overview

Use this object to define the universal links you want to associate with your domain.

The object contains these keys:

defaults

The global pattern-matching settings to use as defaults for all universal links in the domain.

details

An array of Details objects that define the apps and the universal links they handle for the domain.

substitutionVariables

Custom variables to use for simplifying complex pattern matches. Each name acts as a variable that the system replaces with each string in the associated string array.

Add the JSON code to your apple-app-site-association file along with the app identifiers for the apps that you designate to handle universal links for your domain. This example code shows a universal links section in an association file:

"applinks": {
  "details": [
    {
      "appIDs": [ "ABCDE12345.com.example.app", "ABCDE12345.com.example.app2" ],
      "components": [
        {
          "#": "no_universal_links",
          "exclude": true,
          "comment": "Matches any URL whose fragment equals no_universal_links and instructs the system not to open it as a universal link"
        },
        {
          "/": "/buy/*",
          "comment": "Matches any URL whose path starts with /buy/"
        },
        {
          "/": "/help/website/*",
          "exclude": true,
          "comment": "Matches any URL whose path starts with /help/website/ and instructs the system not to open it as a universal link"
        },
        {
          "/": "/help/*",
          "?": { "articleNumber": "????" },
          "comment": "Matches any URL whose path starts with /help/ and that has a query item with name 'articleNumber' and a value of exactly 4 characters"
        }
      ]
    }
  ]
}

Topics

Universal links definitions

Pattern-matching defaults

Substitution variables