totiDev
totiDev

Reputation: 5275

Is it possible to open an iOS app from certain links in the website?

I have managed to get iOS 9 universal links to work, so that if a user is sent an email with the link http://www.exampledomain.com/payment then it can open in my app.

But what I have not been able to get working is if the user is in Safari and is on my site (http://www.exampledomain.com), and then clicks on a payment link that would direct them to http://www.exampledomain.com/payment, this does not open in my app. Is it possible to get the app to open in this way?

Upvotes: 0

Views: 173

Answers (2)

Alex Bauer
Alex Bauer

Reputation: 13613

The previous answer has a partially functional workaround (URL schemes are not a great option for deep linking because they don't handle situations where the user doesn't have your app installed), but doesn't fully address the reason why this issue is happening.

Universal Links need to be on a different domain from the page the user is currently viewing. If you're on http://www.exampledomain.com, then the Universal Link needs to be somewhere like http://links.exampledomain.com. This is a limitation from iOS.

At Branch.io, we get around this by hosting a separate variant of every domain that is never shown directly to users but is put behind links to make sure the app always opens.

Upvotes: 0

Muhammad Noman
Muhammad Noman

Reputation: 1576

I had a same scenerio and i found solution via deeplink , need to make urlscehme for mobile site and we can do easily help of our server .

For instance : we share a url of like http://www.exampledomain.com/payment

If user tap on this it will redirect to our server and server detect device type is mobile it will redirect to urlscheme like yourappurlschme://payment if app is installed it will open other ways it will redirect to itune to download or webapge. i am pasting link which will be helpfull.

http://www.brianjcoleman.com/tutorial-deep-linking-in-swift/

How to open a native iOS app from a web app

Upvotes: 1

Related Questions