Universal link or deep linking
Universal links are those when you have a link of with particular parameters saved or contain your iPhone and if the application is installed on your iPhone related to that link will open up your application without opening the Safari browser and if your application is not installed on your iPhone then that link will open the Safari browser.Steps to implement universal links in iOS:-
- The first step is to register your application on apple.developer.com
- While creating app Id enable associated domains.
- Go to Xcode click on your target -> Capabilities.
- In Capabilities enable the Associated Domains.
- In Associated Domains add applinks:yourdomain.com example applinks:google.com
- Create apple-app-site-association file. the format of apple-app-site-association file is:-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
{ "applinks": { "apps": [], "details": [ { "appID": "3XXXXX9M83.yourdomain.com", "paths": [ "*" ] } ] } } //app ID = "TeamID: your domain.com" //Team Id is you developer account team id //paths = links that refer your domain * will open all the links associated with your domain |
- the file must Uses application/json MIME type.
- Does not have an appended .json to the apple-app-site-association file name.
- Your domain must have SSL certificate and it will work only on HTTPS.
- The file must be saved at the root of your server.
- then save links associated with your domains in notes and click on the link it will open your application without opening safari browser if your application is installed on your iPhone.