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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 10:02:00  来源:igfitidea点击:

How to open application using URL?

iosswifturl-scheme

提问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

Add Innformation In Info.Plist File

在 Info.Plist 文件中添加信息

In Url Identifier Enter Your Package Name && Url schemes add Application Name

在 URL 标识符中输入您的包名称和 URL 方案添加应用程序名称

  1. In Url Identifier Enter Your Package Name && Url schemes add Application Name
  2. open link like schemesname://Then Open Your App
  1. 在 URL 标识符中输入您的包名称和 URL 方案添加应用程序名称
  2. 打开链接就像schemesname://然后打开你的应用程序

回答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!

希望能帮助到你!