13

I have the requirement to launch an app when an sms or email link is followed. I have already been reading about URL schemes and already test that and it works, but the problem is that if the app is not installed on the device nothing will happen. I need a way to open a web url if the app is not installed, but I couldn't find a way of doing this...

Any idea?

Thanks

Andres
  • 11,439
  • 12
  • 48
  • 87
  • How mail app is identifying the your URL schema? is there any format? @Andes – Ganesh G Dec 16 '14 at 19:52
  • @G.Ganesh the best solution is to follow the instructions from Zebs, the accepted answer – Andres Dec 16 '14 at 20:03
  • I don't want to open app from AppStore. I just want how mail app identifies the URL schema of my app. I added values like URL identifier: "com.openAgilePointApp" and URL Schema: "todolist://www.acme.com?" in plist and sent to Apple mail app but mail app does not identifies these values. – Ganesh G Dec 16 '14 at 20:06
  • @G.Ganesh yes, I had the same problem but then I just sent an http:// url and the redirect once safari is opened... I don't know how to help you with that... I also googled a lot to try to find an answer but couldn't nail it. – Andres Dec 16 '14 at 20:50
  • 1
    Hey @Andres - I'd recommend you just configure a Branch link (https://branch.io) to handle this logic for you. It will open your app when it is installed and fallback to an App Store or website (depending how you configure it) when not. Don't build this yourself.. it's a waste of time. – Alex Austin Nov 16 '15 at 05:44

2 Answers2

9

It can be done. The way I would structure it is by having a redirect from a server you control.

  1. You send the user a link that points to your server.
  2. You try to launch your app using the custom URL scheme.
  3. If it fails, you redirect the user to the app store so they can download your app.

Here is an interesting question with several ways to check if the launch attempted via your custom URL was successful.

Community
  • 1
  • 1
Zebs
  • 5,378
  • 2
  • 35
  • 49
  • Can you give more details about steps 2 and 3? E.g. are there services that do this, how does the server check if it fails, etc. – Trevor McKendrick Dec 18 '13 at 01:19
  • You won't be able to redirect to your app's page in the App Store unless you're already in your app. Mail isn't going to do this. – Marcus Adams Dec 16 '14 at 18:10
0

I would insert a link to the website in SMS body. Then I would write a script on the website which will either open a download link or open the app

This answer will solve your problem

Community
  • 1
  • 1
Oleg
  • 2,984
  • 8
  • 43
  • 71