Getting Started with Apple Universal Links

Overview

Singular supports Apple Universal Links for your Apps.  If 'Universal Links' is enabled, traditional URL scheme based deep-linking will be served to devices on iOS 8 and below, and Universal Links will be served to devices on iOS 9 and above.  As long as your app supports Universal Links, Singular will ensure your users are served the right deep-link to optimize user experience.

Supporting Universal Links

Universal Links is a technology that ties your iOS application with an HTTPS web URL. If this is your team's first time configuring Universal Links, we highly recommend reading through the steps below.

In summary, the following things are required for your application to properly support Universal Links:

  1. The application must have Associated Domains service enabled in your Apple developer's dashboard.
  2. An apple-app-site-association configuration file must be hosted on a valid HTTPS web domain.
  3. The mentioned web domain must be added as an Associated Domain in the iOS application build.
  4. Your application code must correctly handle Universal Links that open the app.

Singular supports either using a Singular hosted Universal Link or your own Universal Link.  If a Singular Tracking Link is enabled with a Universal iOS Destination URL, Universal Links are served to devices on iOS 9 and above.

iOSUniversalLinkEnabled.png
 

Singular Hosted Universal Links

If this option is enabled, Singular will create a domain and host an apple-app-site-association file for your app. Using a Singular hosted Universal Link is recommended for optimal user experience to engage people into your app. Users who click on the Tracking Link with a Singular hosted Universal Link will be taken into the app if installed, or sent to the fallback URL (usually the iTunes app store), if the app is NOT installed.

If you would like to use Singular to host a domain for Universal Links, the steps are broken down and required as follows:

In your Apple developer account, make sure Associated Domains service is enabled for your app.

  1. Verify your Prefix to be the correct app, and record the ID (your Apple Team ID). This ID will be used in the next step.

    appledevassocdomains.png

  2. Go to your iOS application in your Singular account (App Page), and pick a domain prefix.  This prefix populates your Application Universal Links to be [prefix].iosapp.info.  This domain must be unique per application.  If your account has multiple iOS apps, a unique domain must be selected for each.  It is recommended to keep this short and identifiable.

    For example: 'Favorite Wallpaper's' domain prefix is configured as favwp.iosapp.info.  Note that this setting cannot be changed once created!  Please reach our support team in case of a change request, but this is not recommended as old Universal Links will become invalid.

  3. After providing your domain prefix, also provide your Apple Team ID. This ID is required and used to populate the apple-app-site-association file Singular hosts on the iosapp.info domain.

    teamID.png

  4. Enable the Associated Domains capability for your app in Xcode, and add the Singular hosted domain in your iOS application's Associated Domains.  Using our example, you will need to add applinks:favwp.iosapp.info

    favwpxcode.png

  5. Lastly, make sure that any Universal Link that opens your app is handled correctly. To do so, implement the application:continueUserActivity:restorationHandler: method in your application delegate.
    - (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler{
    
       if ([userActivity.activityType isEqualToString: NSUserActivityTypeBrowsingWeb]) {
            NSURL *url = userActivity.webpageURL;
    
           // Put code here to take user to relevant content
       }
       return YES;
    }

It's also recommended that your application supports traditional URL scheme-based deep-linking. 

Once the above is completed, your application is now properly configured for using Singular hosted Universal Links! 

Using Your Own Universal Links

If your app already supports Universal Links as listed through steps #1-5 above, you can choose to place that Universal Link in your iOS destination. Users who click on the Tracking Link will be taken into the app if installed, or the Universal Link web URL in their mobile browser if the app is not installed. 

Note:

  • An app can be configured to support multiple Universal Links.  Having your own and a Singular Universal Link is perfectly fine!

  • Using Singular macros in Universal Links is supported

Other things to consider

  • Reporting: similar to Tracking Links, reporting on Smart Links is tied to your iOS and Android applications tracked with Singular. As a result reporting on web URL clicks is not available at the moment.
  • iOS - Browser Support: for Tracking Links to function as intended on iOS devices, the device browser must support Javascript. Tracking Links will still redirect users to web URLs if Javascript is not enabled, but other functionality will be limited.
  • Android - Device Support:  for Tracking Links to function as intended on Android devices, the device must support Android Intents.
  • Web URL: if a web URL is specified for a destination, you will guarantee that your users will land on a platform-agnostic Fallback URL. If no web URL is specified, for all users on platforms other than iOS or Android one of the iOS or Android Fallback App Store URLs will be chosen to redirect the user.
  • Overriding Destination URL: If you absolutely need to override a destination URL in the Tracking Link itself, follow the instructions here
Have more questions? Submit a request

0 Comments

Article is closed for comments.