Daniel Magliola
Daniel Magliola

Reputation: 32392

iPhone apps: Can I detect whether a user has a certain app installed from a website?

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

Upvotes: 1

Views: 3798

Answers (1)

kennytm
kennytm

Reputation: 523184

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.

Upvotes: 2

Related Questions