Skip to content
Branch: master
Find file History

id title subtitle dateupdated brief article link
App Links for iOS
How to Link to other apps and Handle Incoming links using App Links
This recipe will show you how to link to other apps using App Links, as well as register your app to receive and parse incoming App Links.
title url
Official App Links Documentation


App Links is an open standard for deep-linking between mobile apps.

There are two main parts to implementing App Links in your apps

  1. Linking to other apps - Instead of opening a web link in a browser directly, you should let the App Links navigation take care of how to open a link
  2. Handling incoming links from other apps - You can advertise on web page links App Link metadata which tells other apps how to deep link to the same content in your app.

Linking to other Apps

  • Install the Rivets NuGet package.

  • Find any instances where you navigate to a URL in your app (either by UIApplication.OpenUrl or by loading the page into a custom web view) and replace them with this:

  • Your app will now attempt to Navigate to another installed app for the URL using App Links, or will fall back to using UIApplication.OpenUrl if no App Link meta data is found, or no apps for the metadata are installed.

Handling Incoming Links

  • Install the Rivets package from the NuGet Gallery if you have not already done so.

  • Edit the Info.plist

Visual Studio for Mac

Open your app's Info.plist file, and under the Advanced tab, in the URL Types section, add a new URL Type like: Image of Info.plist configuration

Visual Studio

Manually edit your Info.plist file and add the following section:

  • In your AppDelegate , setup your app to have a Navigation controller which is your window's root view controller, like this:
UINavigationController navController;

public override bool FinishedLaunching (UIApplication app, NSDictionary options)
    window = new UIWindow (UIScreen.MainScreen.Bounds);

    navController = new UINavigationController ();
    window.RootViewController = navController;

    window.MakeKeyAndVisible ();
    return true;
  • Create a view controller to display your product:
public partial class ProductViewController : UIViewController
    public ProductViewController (string productId) : base ()
        ProductId = productId;

    public string ProductId { get; set; }

    public override void ViewDidLoad()
        var label = new UILabel(new RectangleF(10, 10, 100, 30));
        label.Text = ProductId ?? &quot;No Product ID Found&quot;;

  • In your AppDelegate add the following code:
public override bool OpenUrl (UIApplication app, NSUrl url, string sourceApp, NSObject annotation)
    var rurl = new Rivets.AppLinkUrl (url.ToString ());

    var id = string.Empty;

    if (rurl.InputQueryParameters.ContainsKey(&quot;id&quot;))
        id = rurl.InputQueryParameters [&quot;id&quot;];

    if (rurl.InputUrl.Host.Equals (&quot;products&quot;) &amp;&amp; !string.IsNullOrEmpty (id)) {
        var c = new ProductViewController (id);
        navController.PushViewController (c, true);
        return true;
    } else {
        navController.PopToRootViewController (true);
        return true;
  • When your app is opened with the url example://products?id=12345 the product view controller will be displayed and you should see the id 12345 from the query string displayed.

  • Create an HTML page with the following HTML:

  <title>Product 12345</title>
  <meta property=&quot;al:ios:url&quot; content=&quot;example://products?id=12345&quot; />
  <h1>Product 12345</h1>
  <p>This could be a page about Product 12345</p>
  • Publish this page somewhere on the internet, or at a location your iOS app can reach.

  • Test navigating using App Links from your iOS app by calling this method somewhere:



This recipe will show you how to link to other apps using App Links, as well as register your app to receive and parse incoming App Links.

You can’t perform that action at this time.