Updated 29 July 2021
Custom URL schemes provide a way to reference inside your app. Users can open a custom URL in the browser or tap in any link. Other apps can also trigger your app to launch with specific context data; for example, a photo library app might display a specified image.
Custom URL scheme is one of the ways of deep linking, but apple strongly recommended universal deep linking. For more information on universal links, see Allowing Apps and Websites to Link to Your Content. Custom URL schemes are also being used to check if the application is installed or not.
Apple also supports common schemes associated with system apps, such as mailto
, tel
, sms
, and facetime
. You can define your own custom scheme and register your app to support it. URLs must start with your custom scheme name. Add parameters for any options your app supports.
To support a custom URL scheme:
URL scheme registration specifies which URLs to redirect to your app. Just follows below steps to add URL scheme:
When the user click on the link or open it in any other broswer, it launches your app on the device in the foreground.
From iOS 13 and later below function will no longer work.
Deep linking will work even your application is killed. This function will get called “openURLContexts”.
Let’s add changes in the SceneDelegate class file as:
Now just run the app and then open Safari and type your URL scheme “customurlblog://”. It works as
Now also check with passing parameters as:
I hope this blog will help you in understanding the behaviour of pan gestures, if you have any comments, questions, or recommendations, feel free to post them in the comment section below!
For other blogs, please click here.
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Be the first to comment.