2

I am trying to detect if my ipad app is installed on a device when visiting my website, in order to suggest different action to the visitor.

Thanks to this post : https://stackoverflow.com/a/8310348/1128754

I found that the "store" application on iphone seems to have achieve to detect if the app is installed on the device. When you click on store links, it launch the app instead of going to the mobile web version.

For example, if you go to : http://store.apple.com/xc/anythinghere with an iphone on which apple store app is installed ( http://itunes.apple.com/app/id375380948 )

it automatically start the store app, instead of the web page.

I tried to follow the stack call with mitmproxy but safari doesn't seems to ask query before launching the app.

So, I guess they did custom url scheme recognition, with http:// links.

Do you think it is possible?

Community
  • 1
  • 1
Diwann
  • 888
  • 1
  • 8
  • 28

2 Answers2

0

This is done with URL protocol handlers:

http://www.iphonedevfaq.com/index.php?title=URL_schemes#URL_Protocol_Handlers

Joe
  • 46,419
  • 33
  • 155
  • 245
  • ok, but how do you handle "http://yoursite.com/" links instead of "customschemes://yourlink" ? – Diwann Jul 05 '12 at 08:14
0

You cannot detect if an app is installed from HTML, but you can launch an app. For example, the popular game "Doodle Jump" can be launched by going to doodlejump://, but if you don't have it installed, the link won't work. As mentioned, this is done with a custom URL scheme and needs to be coded into your app.

C0deH4cker
  • 3,959
  • 1
  • 24
  • 35
  • I already know that but where is the custom scheme in the url ": http://store.apple.com/xc/anythinghere" ?? – Diwann Jul 05 '12 at 08:13
  • Apple has an internet plugin that watches for iTunes links, and if it sees that one is trying to be visited it opens in iTunes or AppStore. They also do the same for youtube links. – C0deH4cker Jul 05 '12 at 13:44