UniversalLink在iOS 14设备上不起作用,但在模拟器上效果很好 [英] UniversalLink is not working on iOS 14 devices, but works well on simulator

查看:100
本文介绍了UniversalLink在iOS 14设备上不起作用,但在模拟器上效果很好的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下解决方案可以在模拟器上支持UniversalLink.

The following solution can support universalLink on simulator.

我有一个支持UniversalLink的应用程序.用户单击网站中受支持的链接,将导航到应用程序中的功能.

I have an app that support the UniversalLink. User click the supported links in the website, will be navigated to the features in the application.

但是它无法在iOS 14 beta 4上运行.它没有打开应用程序,而是打开了一个内置网页.

But It failed to work on the iOS 14 beta 4. Instead of open the the app, it opens a webpage instread.

经过研究,我可以从此处的文档中看到

After research, as I can see from the document here https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_associated-domains

需要更新Service.entitlements以同时支持iOS 13和iOS 14

Need to update the Service.entitlements to support both iOS 13 and iOS 14

<Key>com.apple.developer.associated-domains</key>
  <array>
    <string>applinks:hosturl</string>
    <string>applinks:hosturl?mode=developer</string>
 </array>

在模拟器上运行良好.但是我无法使其在设备上运行.任何人都可以帮助您.

It is working well on the simulator. But I am unable to make it working on the devices. Anyone can help this.

推荐答案

如果要在开发环境中打开应用程序,则必须:

If you want to open the application in a development environment you must:

服务:完全限定域?mode =备用模式

例如: applinks:YOUR_DOMAIN?mode = developer

在测试设备上,您需要激活域关联开发"设置,该设置位于: 设置 -> 开发人员

On the test device, you need to activate the Associated Domain Development setting which is in : Setup -> Developer

这篇关于UniversalLink在iOS 14设备上不起作用,但在模拟器上效果很好的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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