HelenaM
HelenaM

Reputation: 1855

iOS how can open app from url or redirect to app store to download the app

I'm tryin to implement sending email or message with url to be open in the app but in case the user doesn't have the app install the url should redirect to download the app in the app store. For example:

1.- user1 sends email to his family with the url to load information in the app 2.- the family doesn't have the app install on there iOS devices and when they click on the url loads the itunes store to download the app. When they download the app the click the url again and the information is load it.

any of you knows how can implement something like this?

I'll really appreciate your help

Upvotes: 0

Views: 4521

Answers (2)

Joshcodes
Joshcodes

Reputation: 8911

The email should contain a link to a webpage for the content if possible. Then, that webpage should be designed so content can be opened in the app (see this question).

Since it is difficult to detect if the app is installed from a webpage, the webpage can have a link to install the app if it is not installed.

Upvotes: 1

Putz1103
Putz1103

Reputation: 6211

You are going to have to launch the app using the already suggested method:

window.location = "myapp://myparam";

Then you are going to need to check if that page launches or not (whether your app starts up or not). If it does not then you can launch a search in the app store by this means:

window.location = "itms-apps://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?media=software&term=(your company/app name)"

Instead of doing this search you could also just provide the link directly in the app store to your app. I see the hardest part being checking whether or not your app launches from the original attempt to launch your app through window.href, I don't know how to accomplish that check.

Upvotes: 0

Related Questions