通用链接(深层链接)在iPhone上不起作用,但在iPad上起作用 [英] Universal links (Deep linking) not working on iPhone but works on iPad

查看:66
本文介绍了通用链接(深层链接)在iPhone上不起作用,但在iPad上起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将深层链接功能构建到我的应用中.我已进行了所有必要的设置,以使深层链接能够正常工作,例如在我的应用程序中启用关联的域,在服务器的根目录中添加 apple-app-site-association ,并且我正在提供有效的通过https的apple-app-site-association,我还使用此工具验证您的apple-app-site-association .

做完所有正确的事后,我在iPad上测试了深层链接功能,该功能可以正常工作.但是,当我尝试在iPhone上执行相同操作时,它无法正常工作,这总是使我不得不进行野生动物园探险.我在6s设备上尝试过,重新安装了该应用程序,清除了Safari网站数据并删除了清除历史.还更新了iPhone和iPad至iOS 9.3.5.更新操作系统并没有改变任何事情.

iPad仍然可以像在9.3.4上一样继续使用深层链接URL.iPhone仍在野生动物园中打开了该链接.

请给我一些有关如何解决此问题的指示,我认为这可能是一个苹果错误,但是我也不明白它如何在运行与iPhone相同的软件的iPad上工作.非常感谢任何帮助或指导.

谢谢.

解决方案

我能够解决此问题,这是我遇到的烦人的问题之一,因为它没有说出问题所在./p>

修正::每当iOS在safari中打开您的链接时,您都需要在safari中拉下网页,然后您会看到一条横幅广告,在应用程序中打开它.单击该横幅后,将来的链接将开始打开该应用程序,而不是在野生动物园浏览器中打开它.

没有任何错误,也没有迹象表明为什么打开链接.我可以肯定的是,每当我安装应用程序时,iOS都不会下载 apple-app-site-association

还请注意,每当您在Safari中打开链接时,网页中的横幅都将不可见,您需要拉下网页,然后该横幅将变为可见,如果您单击应用程序中的横幅打开,它将开始在应用程序中打开链接.

如果将来如果您选择通过单击状态栏右侧显示的上下文菜单来查看safari中的链接,则将在safari中说在[您的应用程序名称]中打开",则该链接会显示在未来将在野生动物园而不是应用程序中打开,如果横幅在应用程序中打开不可见,则必须拉下网页才能看到该横幅.

HTH.

I am trying to build deep linking feature into my app. I did all the necessary set up for deep linking to work like, enabling associated domains in my app, adding apple-app-site-association to the root directory of my server, and I am serving a valid apple-app-site-association over https, I also validated my apple-app-site-association using this tool Validate your apple-app-site-association.

After doing everything right, I tested the deep linking feature on my iPad and it worked as expected. But when I tried to do the same on my iPhone it doesn't work, it always took me to safari. I tried it on 6s device, I reinstalled the app, I cleared Safari website data & cleared the history. Also updated the iPhone & iPad to iOS 9.3.5. The updating the OS didn't change a thing.

iPad still continue to work with deeplink URLs just like it did while it was on 9.3.4. iPhone still opened the link in safari.

Please give me some pointers on how to workaround this issue, I think this might be an apple bug but again I don't understand how it can work on iPad which is running same software as iPhone. Any help or guidelines is much appreciated.

Thanks.

解决方案

I was able to fix this issue and this is one of the annoying issue that I have come across, because it doesn't say what is going wrong.

Fix: Whenever the iOS opens your link in safari, you need to pull down the webpage in safari and there you'll see a banner saying that, open it in the app. Once you click on that banner your future links will start opening the app instead of opening it in the safari browser.

There was no error whatsoever and there was no indication why the link was getting opened I am pretty sure that, iOS didn't download the apple-app-site-association whenever I installed the app.

Also note that the banner in the webpage will not be visible whenever your link opens up in safari, you need to pull down the webpage and then the banner will become visible and if you click on open in app banner, it will start opening the links in app.

If in future if you select to view the link in safari by clicking on context menu which appears on right hand side of the status bar, which will be saying "Open in [your app name]" in safari, the links in future will open in safari instead of app, and again if the banner open in app isn't visible, you have to pull down the webpage to see that banner.

HTH.

这篇关于通用链接(深层链接)在iPhone上不起作用,但在iPad上起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆