Creating URL schemes
Deep Linking is becoming very important, it's a great way to enhance the effectiveness of your app's marketing campaigns. It will allow you to open a specific view of your app from another app, from a push message, from an in-app message or even from a website to your app.
To take advantage of it, you must create a custom URL Scheme associated with your application. A URL scheme lets you communicate with other apps through a protocol that you define. To find out more, check out Apple documentation.
To register your URL Scheme:
- Select your app target from the sidebar, then select the Info tab.
- Open the URL Types expander and click
- In the
URL Schemesfield, enter
- Assign a unique identifier to the scheme to ensure uniqueness and avoid name collisions, so we’ll use
com.myapp.urlfor the example.
That’s it! To verify that everything works:
- Run your app
- Open Safari on the same device
your_app_url_scheme://in the address bar, then press
You should arrive on the expected page
Whitelisting URL Schemes
iOS 9 introduces changes that impact URL scheme management. For more details, you can consult Apple's documentation.
Make sure that your application Info.plist includes the
LSApplicationQueriesSchemes set with your app's URL Scheme (see previous section to find out how to create your app's URL scheme) and every scheme your app will query.