简体   繁体   English

iOS深层链接和Universal链接,如何在ios中进行深层链接

[英]iOS Deep linking and Universal link, how to deep link in ios

I read that from iOS 9, Universal links are introduced. 我从iOS 9读到,引入了通用链接。 Please explain the different between Deep-linking and universal links. 请解释深层链接和通用链接之间的区别。 My objective is, a link will be sent in mail to customers. 我的目标是,链接将通过邮件发送给客户。 Let the mail says there is an offer for item A, and a link. 让邮件说项目A和链接有报价。 On clicking the link 点击链接

  1. If the app is installed then, open the app and launch specific screen showing item A 如果已安装该应用程序,请打开该应用程序并启动显示项目A的特定屏幕
  2. If app is not installed then, download it from App Store and open it and launch specific screen showing item A 如果未安装应用程序,请从App Store下载并打开它,然后启动显示项目A的特定屏幕

What if there is a user login feature? 如果有用户登录功能怎么办?

If app is installed and user is not logged in then, 如果安装了应用程序并且用户未登录,则

  1. open the app 打开应用程序
  2. Launch login screen 启动登录屏幕
  3. After login is success launch specific screen showing item A. 登录成功后启动特定屏幕显示项目A.

How can these be implemented? 这些如何实施? How the links are configured for these? 如何为这些链接配置?

As of iOS 9.2, released December 8th, 2015, Apple has sounded the death knell for URI scheme based redirects, the standard for deep linking for the last seven years. 截至2015年12月8日发布的iOS 9.2,Apple已经敲响了基于URI方案的重定向,这是过去七年中深度链接的标准。 They've decided that Universal Links are the future. 他们认为Universal Links是未来。

Earlier in order to use a URI scheme, you have to manually handle the case of the app not being installed.The problem with this is that when the app is not installed, it shows a ' Cannot Open Page ' error. 之前为了使用URI方案,您必须手动处理未安装应用程序的情况。此问题是,当未安装应用程序时,它会显示“ 无法打开页面 ”错误。 I'm sure you've all seen it. 我相信你们都看过了。 It's the bane of deep linking .We were able to bypass this in iOS 7 and iOS 8 , but it is not possible now from iOS 9 . 这是深度链接的祸根。我们能够在iOS 7iOS 8中绕过它,但现在不可能从iOS 9开始

Get more details form this link 从此链接获取更多详细信息

To clarify, 'deep links' are simply links that, when clicked, cause your app to open directly to content. 为了澄清,“深层链接”只是链接,点击后会导致您的应用直接打开内容。 Universal Links are a type of deep link, as are URL scheme links, but neither is a perfectly bulletproof solution right now so to cover all edge cases, you'll want to implement both. 通用链接是一种深层链接的,因为是URL方案的链接,但也不是一个完美的解决方案防弹现在这样覆盖所有边缘的情况下,你要实现这两个。

Fortunately Branch can handle all of that complexity behind the scenes so you don't have to worry about it! 幸运的是,Branch可以在幕后处理所有这些复杂性,因此您不必担心它! As mentioned in the answer above, the guide here will get you up and running with exactly the implementation you described! 正如上面的答案中所提到的, 这里的指南将帮助您完成所描述的实现!

I found a usable link here . 我在这里找到了一个可用的链接 It gives step by step details about deep linking using Branch.io 它使用Branch.io逐步提供有关深度链接的详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM