1

I'd like to use links with special schemes in a website that'll launch an iphone app for a user when clicked (see my previous question for reference).

Is there some way that I can detect, in this website, whether my app is installed? (as in, the app that'd handle my special scheme). My idea is to decide whether to show a "install our app" link, or a "go to our app" link.

Is this possible?

Thanks!
Daniel

Community
  • 1
  • 1
Daniel Magliola
  • 30,898
  • 61
  • 164
  • 243

1 Answers1

2

You can use -[UIApplication canOpenURL:] to test whether an app will respond to your custom URL scheme.

Note that this won't detect if an unrelated app hijacks your URL scheme.

Sorry, did not notice the "from a website" part. This only works from an App.

kennytm
  • 510,854
  • 105
  • 1,084
  • 1,005
  • 2
    Look: http://stackoverflow.com/questions/1108693/is-it-possible-to-register-a-httpdomain-based-url-scheme-for-iphone-apps-like-y/1109200#1109200 – Erik Apr 21 '10 at 08:00