开发者

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

开发者 https://www.devze.com 2022-12-17 08:58 出处:网络
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).

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 开发者_JAVA技巧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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消