1

is this possible somehow?

I would like to redirect to different pages depending on whether the user already installed an app or not.

Bersaelor
  • 2,517
  • 34
  • 58

3 Answers3

4

It is completely impossible for your server to reliably tell whether an app is installed on the client.

(Unless you can associate app users with page viewers by user account)

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • I registered an URL Scheme in my info.plist. Might it be possible to recognize whether safari would respond to the URL-Scheme? – Bersaelor Nov 15 '10 at 00:50
  • 1
    No, it wouldn't be possible. (at least from the server) – SLaks Nov 15 '10 at 01:16
  • Well I guess then I can only show a page with 2 links, one to the store if the app is not installed, one to the app if it is installed. Then the user has to decide, which is an ugly extra step... – Bersaelor Nov 16 '10 at 14:43
  • If you're okay with using javascript and have registered a URL Scheme on your app, than it is possible: http://stackoverflow.com/questions/1108693/is-it-possible-to-register-a-httpdomain-based-url-scheme-for-iphone-apps-like-y/1109200#1109200 – Jon Jul 06 '11 at 22:53
0

Not really possible. You can launch the app using the custom URL scheme but the user will get a Safari error dialog if the app isn't installed.

I guess your app could ping the server with some unique session ID when it launched and you could send this back to the web page using Ajax as a success validation.. Seems like a lot of work and pretty fragile.

It may be possible to detect the safari error dialog with some clever JavaScript?

TomSwift
  • 39,369
  • 12
  • 121
  • 149
0

This would be a pretty significant privacy violation. A phishing site, for example, could determine which banks I use by looking for their iPhone apps on my phone. Apple's not going to permit that, let alone make the data available deliberately.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
  • If the app must explicitly publish the data, it wouldn't be (such) a privacy hole. However, it's still impossible. – SLaks Nov 15 '10 at 01:27