简体   繁体   English

iOS中的深层链接-如果未安装应用,请导航至Apple Store

[英]Deep Linking in iOS - Navigate to Apple Store if app not installed

I need to implement Deep Linking concept without using any third party libraries (Branch and etc..). 我需要在不使用任何第三方库(分支等)的情况下实现Deep Linking概念。 The link (starts with http/https) will be shared from app through Message, Email or any Social media apps. 链接(以http / https开头)将通过消息,电子邮件或任何社交媒体应用程序从应用程序共享。 By tapping on shared link I want to open corresponding app if its already installed on device else it should navigate to the Apple Store to download the app. 通过点击共享链接,我想打开相应的应用程序(如果该应用程序已安装在设备上),否则应导航到Apple Store以下载该应用程序。

I have knowledge on URL schemas but it works only when the app is already installed on device and the schema URL format also be different (like fb:// for Facebook app). 我对URL架构有一定的了解,但是只有在设备上已经安装了应用程序并且架构URL格式也不同的情况下它才起作用(例如对于Facebook应用程序为fb://)。

I have also done some R&D on Universal Links but I don't know whether it supports for dynamic links as for me the link will be combination of base URL(static) and referrer key(dynamic). 我还对Universal Links进行了一些研发,但我不知道它是否支持动态链接,因为对我而言,该链接将是基本URL(静态)和引荐来源网址(动态)的组合。 I also need to track the referrer information once the corresponding app is opened like who referred this app (referrer details). 一旦打开相应的应用程序(例如谁引用了此应用程序,我也需要跟踪引用者信息)(引用者详细信息)。 eg: https://domain.com/ReferrerID Can you please help me on it. 例如: https : //domain.com/ReferrerID您能帮我吗。 Thanks in advance. 提前致谢。

To make it clear on Universal Links in iOS will not take you to Apple Store if app is not installed on device. 如果未在设备上安装应用,则要在iOS Universal Links上明确表示不会将您带到Apple Store。 When you click on a link then Universal Links helps you to open the app if the app is already installed on device else the same link will be going to browse in Safari . 当您单击链接时,如果该应用程序已安装在设备上,则Universal Links可以帮助您打开该应用程序,否则将在Safari浏览相同的链接。 When the url browse in Safari then we have to run JavaScript to navigate/redirect to Apple Store. 在Safari中浏览url时,我们必须运行JavaScript来导航/重定向到Apple Store。

Yes you can support universal links to your application from iOS 9 or above. 是的,您可以支持从iOS 9或更高版本到应用程序的通用链接。 You can generate dynamic links and have deferred deep linking also. 您可以生成动态链接,也可以延迟深层链接。 Follow this steps its simple Click Here 遵循此步骤简单单击此处

For the file mentioned in the link you need to add that file in the root of your website which consists of the path valid for deeplinking. 对于链接中提到的文件,您需要将该文件添加到网站的根目录中,该根目录包含对深度链接有效的路径。 And that file should not have any extension. 该文件不应具有任何扩展名。

Then validate your domain at Here . 然后在Here验证您的域。

After that you can add all the domains thing in your associated domain under the project capabilites. 之后,您可以在项目功能下的关联域中添加所有域内容。

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

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