ios:通用链接在iOS 10上不起作用 [英] ios: Universal links not working on iOS 10
问题描述
我正在尝试将通用链接集成到我的iOS应用中。因此,只要有人点击< myapp> .herokuapp.com / content
,就会直接重定向到应用。我遵循了此设置指南。我进行了以下设置,但无法正常工作。我还检查了stackoverflow上的其他线程,但没有一个解决问题。
I'm trying to integrate universal links in my iOS app. So whenever someone taps on <myapp>.herokuapp.com/content
gets redirected directly to app. I followed this guide for setup. I did the following setup but cannot get it working. I also checked other threads on stackoverflow but none of them solved the issue.
- 在应用程序目标的功能选项卡中添加了相关域。添加了两个域:
活动继续:< myapp> .herokuapp.com
和applinks:< myapp> .herokuapp.com
。 - 在构建阶段>复制捆绑资源中添加了文件.entitlements。
- 从 https://developer.apple.com/account/#/membership
-
在我的网站上通过
https://< myapp> .herokuapp.com / apple-添加了
,它返回以下json:apple-app-site-association
的路由app-site-association
- Added Associated Domains in Capabilities Tab on my app's target. Added two domains:
activitycontinuation:<myapp>.herokuapp.com
andapplinks:<myapp>.herokuapp.com
. - In Build Phases > Copy Bundle Resources added the file .entitlements.
- Got teamId from https://developer.apple.com/account/#/membership
On my website added a route for
apple-app-site-association
athttps://<myapp>.herokuapp.com/apple-app-site-association
which returns the following json:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "<teamId>.<bundleId>.dev",
"paths": [ "*" ]
},
{
"appID": "<teamId>.<bundleId>",
"paths": [ "*" ]
}
]
},
"activitycontinuation": {
"apps": [
"<teamId>.<bundleId>.dev",
"<teamId>.<bundleId>"
]
}
}
从以下位置安装的应用Xcode到iPhone 6s Plus(物理设备)的捆绑包ID < bundleId> .dev
并复制了链接 https://< myapp> .herokuapp .com / content
到Notes,但会在Safari中打开。
Installed app from Xcode to iPhone 6s Plus (physical device) with bundle id <bundleId>.dev
and copied link https://<myapp>.herokuapp.com/content
to Notes but it opens in Safari.
推荐答案
解决了该问题。问题是我正在测试Debug配置。当我尝试使用Release build时,现在一切正常。
Fixed the issue. The problem was that I was testing with Debug configuration. When I tried with Release build everything is now working fine.
这篇关于ios:通用链接在iOS 10上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!