Custom URL Scheme | Deep-Link |

iOS 13 and later Swift 5

MdNiks
2 min readJun 11, 2020

Welcome Guys,

The custom URL schemes we can launch the application from anywhere. Custom URL schemes are also being used to check if the application is installed or not.

Using custom URL schemes we can pass some of the data to the application as a parameter, then the app process the data and show appropriate information to the user.

From iOS 13 and later below function will no longer work.

Adding Custom URL Scheme in the Project

Just follow below step to add url scheme

1: Open Project
2: Select Target
3: Now select Info and go to the URL Types and click on ‘+’
4: Now in the ‘URL Schemes’ field enter your custom URL like your app name( in small and don’t use space). Suppose your app name is “mdNiksDeepLink” the use "mdniksdeeplink" as a custom URL scheme.

Let’s see SceneDelegate class file.

Deep linking will work even your application is killed. This function will get called "openURLContexts".

1: Now just run your application
2: Then put app into background or kill.
3: Open Safari and type your url scheme mdniksdeeplink://

Passing a parameters

looks like that mdniksdeeplink://appId=007

Just use it. w00t! How cool is that and all done with just follow fews steps.

If you have any comments or questions, please respond below! I’d love to hear from you.

--

--

MdNiks

I'm an accomplished iOS programmer with more than 12 years of experience working in a collaborative environment with tight deadlines.