-2

Is there anyway to launch application from Apple mail application. The concept is, we will send a link to user's mail id. User will open mail app from his/her iPhone and once they tap on that link then immediately my application has to launch. If it didn't find my installed application in his/her iPhone then it should pop up says "You have not installed the application. Please visit AppStore and download". I found some similar(not exactly) question from this link but even the user also commented as "mail app does not identifies installed app".

Please help me. Thanks in advance.

Community
  • 1
  • 1
Ganesh G
  • 1,991
  • 1
  • 24
  • 37

1 Answers1

4

If your app implements a custom URL scheme, you can open your app with a URL.

Though an app such as Mail can detect if the URL scheme is registered with an app, it won't know which app "would" register that URL scheme. So, the first part of your question is possible, but not the second.

If they were using your mail app, then you could do the second part. If the URL scheme was not registered (check with canOpenURL), you could send them to the page in the app store to download it.

You can also accomplish this from Safari (with JavaScript) or with Smart App Banners. More information is in this question: Launching app OR app store from Safari?

Community
  • 1
  • 1
Marcus Adams
  • 53,009
  • 9
  • 91
  • 143
  • Is it possible to add some dynamic values to custom URL schema? – Ganesh G Dec 16 '14 at 18:36
  • The protocol part ('http' is the protocol port of standard web URL) is the part that designates the app. The data can be anything as long as it's URL encoded. Read the docs that I linked to in order to learn more. – Marcus Adams Dec 16 '14 at 19:15
  • I added values "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. How mail app will identify? is there any special format? @Marcus Adams – Ganesh G Dec 16 '14 at 19:50