Is there a method to determine in a web page if the device has a particular app installed?
-
2I don't think this is possible, it would be a security risk but I might be wrong...elclanrs– elclanrs2012-11-08 22:22:34 +00:00Commented Nov 8, 2012 at 22:22
-
I seriously doubt it. This kind of access would be a security risk.Kevin Boucher– Kevin Boucher2012-11-08 22:22:43 +00:00Commented Nov 8, 2012 at 22:22
2 Answers
Depending on what you want to do, there is a way. Check out Launching an app with a custom url scheme.
If you want to get your mobile browsers to download/use your application, you can set it up with a custom url scheme as detailed in that post. From safari, add a link to your app's custom url. If you get an error or aren't redirected when a link is clicked or triggered (which you can check for with a setTimeout()) Then the app is not installed.
I don't know what your use case is, so that's the best I can do.
Comments
If you're just trying to promote your app only if it isn't installed, you can add a meta tag to the page:
<meta name="apple-itunes-app" content="app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL">
For more information, see Promoting Apps with Smart App Banners on Apple's developer website.
If that's not what you're trying to do, this answer may be helpful.