How do I detect, via javascript in Safari Mobile, if my iPhone application is installed?

后端 未结 2 1185
夕颜
夕颜 2020-12-05 00:49

As you probably know, iPhone applications can register a custom URL scheme handler, ala \"myapp:\" and these can be used for links in a page viewed in Safari.

I\'d

相关标签:
2条回答
  • 2020-12-05 01:47

    The solution I've presented on another Stack Overflow question is about as close as you're going to get.

    0 讨论(0)
  • 2020-12-05 01:54

    I don't think this is possible. You would need to register your app on the iPhone/Mobile Safari and then create a uri to fire your app up, just like http:, ftp: mailto:. So in your case you would have something like Am I installed Mobile Safari would need to know what app to fire up to load that URI and I just don't think this functionality is built into the iPhone. I know there is no way javascript can query your iPhone to see what's installed.

    I hope I am wrong as this seems like it would be a powerful feature, though on the other side I can see some security issues related to something like this.

    Good luck.

    0 讨论(0)
提交回复
热议问题