ios 如何使用 URL 打开应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39287958/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to open application using URL?
提问by dipen gtl
I have implemented all the required things but had no success. I want to open the application from browser - but not with just URL schemalike a "callback".
我已经实现了所有必需的东西,但没有成功。我想从浏览器打开应用程序 - 但不仅仅是像“回调”这样的URL 模式。
I have something like "http://11.11.21.114:8081/signup/callback?signupCode=123?id=20" so how can I identify this url to open my application?
我有类似“ http://11.11.21.114:8081/signup/callback?signupCode=123?id=20”这样的东西,那么我如何识别这个网址来打开我的应用程序?
回答by gunjot singh
Use Universal Links
使用通用链接
But it will only work with Public website URL, that should be accessible to Apple Servers.
但它仅适用于 Apple 服务器应该可以访问的公共网站 URL。
The only thing you need is to have https server and access to upload a associated domains file.
您唯一需要的是拥有 https 服务器并有权上传关联的域文件。
When you support universal links, iOS 9 users can tap a link to your website and get seamlessly redirected to your installed app without going through Safari. If your app isn't installed, tapping a link to your website opens your website in Safari.
当您支持通用链接时,iOS 9 用户可以点击指向您网站的链接并无缝重定向到您安装的应用程序,而无需通过 Safari。如果您的应用程序尚未安装,点击指向您网站的链接会在 Safari 中打开您的网站。
Apple Link : => Support Universal Links
苹果链接:=>支持通用链接
Follow this nice tutorial : => Universal Link
按照这个不错的教程:=> 通用链接
回答by BHAVIK PANCHAL
回答by Shobhakar Tiwari
To Launch application from Url , Deep Linkis used . Here is tutorial for complete step by step for opening application :
要从 Url 启动应用程序,使用了深层链接。这是打开应用程序的完整分步教程:
http://blog.originate.com/blog/2014/04/22/deeplinking-in-ios/
http://blog.originate.com/blog/2014/04/22/deeplinking-in-ios/
Once its done , just add url into Xcode Plist file, then passing url on browser will launch iOS Application.
完成后,只需将 url 添加到Xcode Plist 文件中,然后在浏览器上传递 url 将启动 iOS 应用程序。
Hope it Helps!
希望能帮助到你!