URL Scheme Installing App

If i had an email with a link with url scheme like this and make click in the link…

myapp//123123

If I had the app installed it would launch the app… But If I don’t have the app installed, How I redirect to the Itunes or google play page to download and install the app?

I don’t have a complete answer to your question, BUT with regards to iOS and iTunes…

Here are some old notes from my personal development  journal:

https://developer.apple.com/library/ios/qa/qa1633/_index.html

–linkURL = “https://itunes.apple.com/us/artist/roaming-gamer-llc./id422793658”, – iOS 6 but not 7

–linkURL = “http://itunes.apple.com/us/artist/roaming-gamer-llc./id422793658”, – iOS 6 but not 7

–linkURL = “http://appstore.com/roaminggamerllc/”, – iOS6 and iOS 7 

rest not sure…

linkURL = “itms-apps://appstore.com/roaminggamerllc/”, 

–linkURL = “itms-apps://itunes.apple.com/app/id422793658”,

–linkURL = "http://itunes.com/apps/roaming-gamer-llc./id422793658"

–linkURL = “itms://itunes.apple.com/us/artist/roaming-gamer-llc./id422793658”,

–linkURL = “itms-apps://itunes.apple.com/us/artist/roaming-gamer-llc./id422793658”,

system.openURL("http://appstore.com/roaminggamerllc/")

Take a look at the initial link and then try some of the URL schemes I listed.  As I recall, I ran into issues between iOS 6 and 7.  Of course, now we’re up to 8 and I haven’t done any app linking in 8 (yet).

Also, note that the above links are for different purposes.  Some are links to my products as a group, others are too specific apps.  Its a bit of a mess, but it is a starting point.

I found an elegant solution, on server side:
http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/

Instead of linking with the url scheme link to a page on your server.

put this code on the page:

\<!DOCTYPE html\> \<html\> \<head\> \<meta charset="UTF-8" /\> \<title\>URL Schemes\</title\> \</head\> \<body\> \<script\> function open() { window.location = "myapp//123123"; setTimeout(function() { if (!document.webkitHidden) { window.location = 'https://itunes.apple.com/us/app/myapp/id942345489?mt=8'; } }, 15); } open() \</script\> \</body\> \</html\>

the script determines if the app is installed by running a timeout. If it is installed it will launch it and if not it will show it in iTunes.

If you also need to determine if it should go to Android or iOS read this nice tutorial:

http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/

Ok you found it while I was writing :slight_smile:

@ojnab thanks I appreciate anyway!

Regards

I don’t have a complete answer to your question, BUT with regards to iOS and iTunes…

Here are some old notes from my personal development  journal:

https://developer.apple.com/library/ios/qa/qa1633/_index.html

–linkURL = “https://itunes.apple.com/us/artist/roaming-gamer-llc./id422793658”, – iOS 6 but not 7

–linkURL = “http://itunes.apple.com/us/artist/roaming-gamer-llc./id422793658”, – iOS 6 but not 7

–linkURL = “http://appstore.com/roaminggamerllc/”, – iOS6 and iOS 7 

rest not sure…

linkURL = “itms-apps://appstore.com/roaminggamerllc/”, 

–linkURL = “itms-apps://itunes.apple.com/app/id422793658”,

–linkURL = "http://itunes.com/apps/roaming-gamer-llc./id422793658"

–linkURL = “itms://itunes.apple.com/us/artist/roaming-gamer-llc./id422793658”,

–linkURL = “itms-apps://itunes.apple.com/us/artist/roaming-gamer-llc./id422793658”,

system.openURL("http://appstore.com/roaminggamerllc/")

Take a look at the initial link and then try some of the URL schemes I listed.  As I recall, I ran into issues between iOS 6 and 7.  Of course, now we’re up to 8 and I haven’t done any app linking in 8 (yet).

Also, note that the above links are for different purposes.  Some are links to my products as a group, others are too specific apps.  Its a bit of a mess, but it is a starting point.

I found an elegant solution, on server side:
http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/

Instead of linking with the url scheme link to a page on your server.

put this code on the page:

\<!DOCTYPE html\> \<html\> \<head\> \<meta charset="UTF-8" /\> \<title\>URL Schemes\</title\> \</head\> \<body\> \<script\> function open() { window.location = "myapp//123123"; setTimeout(function() { if (!document.webkitHidden) { window.location = 'https://itunes.apple.com/us/app/myapp/id942345489?mt=8'; } }, 15); } open() \</script\> \</body\> \</html\>

the script determines if the app is installed by running a timeout. If it is installed it will launch it and if not it will show it in iTunes.

If you also need to determine if it should go to Android or iOS read this nice tutorial:

http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/

Ok you found it while I was writing :slight_smile:

@ojnab thanks I appreciate anyway!

Regards