
This function is part of UIApplicationDelegate protocol.

You can check the video on how I do it.įor your app to be able to listen to custom url schema clicks you will need to add the below function to your AppDelegate.swift file. And replace the value of CFBundleURLName with a value of Bundle Identifier of your app. Our goals for Swift are ambitious: we want to make programming simple things easy, and difficult things possible.

Swift makes it easy to write software that is incredibly fast and safe by design. Create a destination URL, Create URL to the source file you want to download, Use URLSession to download a file from a remote URL, Copy downloaded file from a temporary URL to a destination URL on the device, Handle file download SUCCESS and ERROR situations. Just remember to make it short and unique. Announced in 2014, the Swift programming language has quickly become one of the fastest growing languages in history. Replace the value of CFBundleURLSchemes which is in my case “SwiftDeveloperBlogDeepLink” with a unique deep link url scheme that will make sense for your app. You can update the file by following the instructions in my video or open it as a source file and paste the following code snipped either at the top of the document(right after the opening tag) or at the bottom of your document(right before the tags). The very first step to add deep linking support for our app will be to update our ist file. Where SwiftDeveloperBlogDeepLink – is the scheme name, For example in my case it is “SwiftDeveloperBlogDeepLink” and complete custom url scheme in my case looks like this: In the case of custom url schema name http will be replaced with the another unique name you create. For example, an address of subscribe page of this web site is:

Think of custom url scheme name as another unique protocol of the address you can come up for your app. So, stay tuned and subscribe to be notified when a new video becomes available.ĭeep Linking With Custom URL Scheme – Video TutorialĬustom URL Scheme Switch from web page to your mobile app specific inner page There is also another way of implementing deep linking for your app and it is called Universal Linking which I will also share with you in one of my next videos.
SWIFT SHARE URL HOW TO
In this video tutorial I am going to share with you how to add Deep Linking support for your app using Custom URL Scheme.
