Xamarin.iOS Universal Links


Universal Links are the preferred method of deep linking to your app in iOS 9+. Unlike Uri Scheme, there are a standard URL, with HTTP or HTTPS. This allows them to have a number of benefits over Uri Scheme including:

  1. Fallback to a website if the app is not installed
  2. Unique to you and no one else can use your URL.
  3. One URL that works for both your website and app. A seamless transition between the two.

Create or Update your App ID

In order to use Universal Links you need to enable Associated Domains in your AppID profile. You can tick it when creating your AppID or edit an existing AppID. Please note that if you edit, you may need to regenerate profiles based on that App Identifier. This is all done in the Apple Developer Portal.

Take note of your App ID Prefix (TeamID) for use later.


Tick Associated Domains


Create And Upload Your Association File

In order to use Universal Links you must have a corresponding website for your app and the ability to upload a file to it. If you don’t have a website then you can not use Universal Links. We need to create an association file that lets Apple verify that you are the owner of the domain.


  1. You need a new association file for each domain and sub domain.
  2. Must be no greater than 128KB even when signed.

Create File

Create a new file called apple-app-site-association. There is no extension on this filename. In the

   "applinks": {
     "apps": [],
     "details": [
         "appID": "9JA89QQLNQ.com.apple.wwdc",
         "paths": [ "/wwdc/news/", "/videos/wwdc/2015/*"]
         "appID": "ABCD1234.com.apple.wwdc",
         "paths": [ "*" ]

Replace the appID with your AppId, prefixed with your AppID prefix as I mentioned above.

Next you can add in the paths you want to associate. Enter in the path names, do not enter any domain names.

Upload File

Upload the file to the root of your website domain or create a new directory called .well-known and place the file in there. As a final note please do not add an extension to this file such as json or txt, it must have no extension.

Register In Your App

Now go to your Xamarin.iOS project and open up the Entltlements.plist file. If you don’t have one, create one


Then in your Associated Domains add in the domain name you wish to associate.

Note: This must be prefixed with applinks: as shown below.



iOS App Loaded

When an iOS app is loaded from a Universal Link, you can override the ContinueUserActivity in AppDelegate.cs to get the URL passed. From here you can them move around in your app as needed.

public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity, UIApplicationRestorationHandler completionHandler)
     return base.ContinueUserActivity(application, userActivity, completionHandler);

If your app is not running, it will get called through a different method.

public override bool OpenUrl(UIApplication app, NSUrl url, NSDictionary options)
    return base.OpenUrl(app, url, options);

If you want more specific details on how to configure Universal Links, check out Apple’s Support Universal Links documentation.

Microsoft MVP | Xamarin MVP | Xamarin Certified Developer |
Exrin MVVM Framework | Xamarin Forms Developer | Melbourne, Australia

Related Posts


    1. Adam Pedley

      Hi Ali. I have just updated the article to show you how that is done. When the app is not running in the background, you need to use the OpenUrl method which is shown above.

Leave A Comment?