Universal Links are a Beta feature. Functionality is subject to change as Trustly continues to make improvements. To enable this feature or request assistance, contact Trustly Support.
Universal Links allow seamless integration between your website and your iOS application. By using standard HTTP or HTTPS links, you ensure that users are directed to specific content within your app without the need for browser redirects or system prompts.
Unlike custom URL schemes, Universal Links provide a reliable fallback strategy: if the application is not installed, the link functions as a standard web link and directs the user to your site. This guarantees the link resolves to the correct content, regardless of whether the app is installed.
Apple recommends Universal Links as the primary method for deep linking due to their security and usability advantages over legacy URL schemes.
The following table compares the features and behavior of Universal Links versus Custom URL Schemes:
To create Universal Links, you must create a JSON file named apple-app-site-association. This file defines the relationship between your website and your application. Host the file at one of the following locations:
https://yourdomain.com/apple-app-site-associationhttps://yourdomain.com/.well-known/apple-app-site-associationEnsure your server meets the configuration requirements:
Content-Type header set to application/json..json).The following example demonstrates how to configure your application identifier and supported paths.
The following table describes the keys used to configure the apple-app-site-association file.
Use the following patterns to control which links open your app:
/profile to match exact URLs./products/* matches products/shoes and products/12345. The asterisk * in the code example directs all remaining traffic to the app. Remove this line if you only want specific paths to open the app.NOT (including a space) to prevent the app from opening specific URLs. For example, NOT /help/* ensures your help documentation opens in the browser, not the app.Run the following command in your terminal to confirm your server is returning the correct Content-Type (it must be application/json):
The Associated Domains entitlement identifies specific domains for which your app should intercept traffic. Adding this entitlement ensures iOS verifies your apple-app-site-association file and routes valid links to your app instead of the browser. See the Apple page on supporting associated domains for more details.
Adding this capability automatically modifies your app’s entitlements file (typically YourApp.entitlements) by inserting the com.apple.developer.associated-domains key.
apple-app-site-association file. You must prefix each domain with applinks:.The following example demonstrates how to configure the entitlement for both your root domain and the www subdomain. Including both entries ensures that links resolve correctly regardless of whether the URL is accessed with or without the www prefix.
iOS delivers the Universal Link to your application using a specific delegate method. You must implement this handler to parse the incoming URL and navigate the user to the specific content they requested.
Depending on your app’s lifecycle configuration (iOS 13+ vs. Legacy), you will implement this in either the Scene Delegate or the App Delegate.
App Universal Links function without a fallback. However, Trustly recommends having a default deep link strategy configured for your merchant account. This ensures your application has a consistent fallback behavior if a strategy isn’t explicitly provided within the establishData object in your code.
Any settings passed to the establishData object in your code override the default configurations stored in your Trustly account profile.
Because this setup requires internal configuration, you’ll need to contact your Customer Success Manager (CSM) or Trustly Support to enable this fallback for your account.
When you submit your request, you must provide the following information:
universal-link.https://yourdomain.com/).