> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appcharge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up a Universal Link (iOS)

This article explains how to set up a [Universal Link](https://developer.apple.com/documentation/xcode/allowing-apps-and-websites-to-link-to-your-content/) for redirecting iOS players from the checkout back to your app.

To configure a Universal Link:

1. Set up a dedicated subdomain. For example, `my-subdomain.appcharge.com`. For more information, see Apple’s official guide on [supporting associated domains](https://developer.apple.com/documentation/xcode/supporting-associated-domains).
2. On this subdomain, host a public `.well-known/apple-app-site-association` file. This file allows iOS to recognize the redirect URL as a Universal Link, so your app can open automatically after payment. Without this file, players will see a confirmation dialog asking if they want to open the app.
   > **Note:** The file cannot be a `.json` extension, and must be served with the `application/json` MIME type.
3. Run the following command with your domain to verify the MIME type:

   ```bash curl theme={"system"}
    curl -I https://my-subdomain.appcharge.com/.well-known/apple-app-site-association
   ```

   The file content should follow this structure:

   ```json json theme={"system"}
   {
   "applinks": {
       "details": [
       {
           "appIDs": [
           "{YOUR_TEAM_ID}.{YOUR_BUNDLE_ID}"
           ],
           "components": [
           {
               "/": "/checkout*",
               "comment": "Matches any URL whose path starts with /checkout"
           }
           ]
       }
       ]
   }
   }
   ```

   Make sure to prefix your App ID with your Apple Developer Team ID, located on the [Apple Developer Membership page](https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=891bd3417a7776362562d2197f89480a8547b108fd934911bcbea0110d07f757\&path=%2Faccount%2F\&rv=1).

When a purchase is completed, this link redirects the player back to your app.
