Akshay Sood
Akshay Sood

Reputation: 6776

How to add url deeplink in iOS Swift

How can I add deeplink (url like https://www.example.com) in iOS using swift.

The scheme in plist is not working if I enter url in it.

You can check the screenshot of plist attached. enter image description here

Upvotes: 2

Views: 7431

Answers (2)

clayjones94
clayjones94

Reputation: 2818

You are attempting to register your app for the URI scheme https which Apple has already reserved for Safari, therefore you will not be able to use it.

Option 1: Custom URI Scheme

You must come up with a custom URI scheme like customURI://www.domain.com

Downside: If a user clicks on this link without the app installed. iOS will show that user and error.

Option 2:Universal Links

Apple launched Universal Links in iOS 9 to enable developers to associate their http link with their app. This requires you to host your own AASA file on your domain so that your domain becomes associated with your app ID.

Option 3: Branch.io

Branch will actually bundle up Universal Links and URI schemes and use them appropriately when necessary. They also perform deferred deep linking. They'll host your AASA file for you, but your app domain will have to be either https://*.app.link or some dedicated subdomain of a domain that you own.

Upvotes: 6

ingconti
ingconti

Reputation: 11636

only to be precise:

If you need more docs about in Apple docs, use the CORRECT name for the technology.

If You use url starting with a schema different from http (for example fb:// for FB) is not a LINK, is a "custom" url.

Anyway use: custom url and see at:

https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html

Upvotes: 0

Related Questions