Possible to launch an iOS app from a web link

↘锁芯ラ 提交于 2019-12-09 05:22:07

问题


My app bounces the user out of the app into safari to do some web things (toying with using a webview but there are other concerns regarding layout, usage, re-launching the app, server errors, etc.). When they are done I would like a link on the final web page that lets them re-launch the app. I think this should be possible through a protocol implementation of some sort (such as href="myAppProtocol://relaunch") but I don't know how to go about implementing it properly.

[UPDATE] (can't answer my own question yet so editing here)

Stumbled across this just after posting (hours of looking and this is always how it comes together...) http://mobileorchard.com/apple-approved-iphone-inter-process-communication/

Using a URL type handler in your plist (as I suspected) you can declare that your app handles urls of that type (say "myAppProtocol"). iOS then launches your app and hands it the URL when it's touched in safari. What you do from there is up to you, I just need to launch so I don't take it any further, but you could grab the URL and parse it out for further passed information etc.


回答1:


I guess you found the answer already, but have a look at the docs as well: Using URL Schemes to Communicate with Apps.



来源:https://stackoverflow.com/questions/5793992/possible-to-launch-an-ios-app-from-a-web-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!