How to Create a universal Link in iOS ??

Posted by Kundan Mistry


How to Create a  Universal Link in iOS ??

It is easy and understandable that how to generate a deep link in iOS. You just need to understand and follow the given steps and you can easily generate a deep link.

There are basically 4 things you need to understand before creating the deep link are:-

1. What is the prefix or team id in our application certificates?
2. How to generate certificate having deep link feature enable, So iOS can
detect that link firstly should be open in app else in the browser?
3. How to create an Apple Association file?
4. How to configure Apple Association file on the server and set into Xcode?

So letʼs understand and follow these four simple steps to get your deep link ready working. First of all, you need a developer account to create deep linking in iOS. In
developer account after login go to view account,thatʼs where you will find team ID or Prefix of your account. As shown below:-

Screen Shot 2017-07-11 at 11.47.20 AM

Secondly, you must have a prior knowledge of generating certificates of either development or distribution in iOS. If not then first take an overview of that.In either development or distribution. while adding an App in appID in
developer account you must check association checkbox or make it configurable. Even if your app has already been added you can edit it and configure it for the association . Just the already exist application and click edit
and check the association checkbox and save it and download aps file replace your old file. As shown into below images. If you havenʼt created application Id in identifies then: -click on the App IDʼs under the

click on the App IDʼs under the identifierʼs, then click plus to add the new application Name and Bundle ID, then check the associated Domains under the App Services as shown below

Screen Shot 2017-07-11 at 12.05.11 PM

If you have already created application Id in identifies then:-
select the application and click “EDIT” button below it,

Screen Shot 2017-07-11 at 12.20.36 PM

Now How to create Association file of apple:
Create a file as shown bellow. Do not give any extension to file. Just create the file as it is.Save this file as “apple-app-site-association”.Here specify your appID and paths. “Paths:” it is the path for your Domain root.


Screen Shot 2017-07-11 at 12.29.10 PM

Now Server configuration:
After creation of this file, put this file in root of your Domain so your server
will configure it and got an idea that along with website there is an application
associated with it.

The last step is to add Associated Domain in your application.

After all the above configuration opens your application in Xcode.

Click on Application —> Targets under that select your app. Then click on capabilities, under the capabilities click Associated Domain. Click on, then add the domain of your website as “” as shown below.

Screen Shot 2017-07-11 at 1.16.47 PM


Everything is ready to work now, but there must be some steps are kept in mind that,
-> while testing links did not work directly in browsers or safari. So keep a link in Notes or any other app to click.
-> If by mistake once you open that link into browser, the iPhone will store that
in preference and next time it will always open it in the browser. Even if you uninstall the app and reinstall that it will not work. To make it work again just long pressed on a link and once open that link with your application. So now it will be working fine again.