问题描述
我在获取通用链接时遇到问题
I'm having trouble getting universal links to work
- 我们已将 json 内容添加到我们的网站 https://couchsurfing.com/apple-app-站点关联
- 我仔细检查了它是否使用了正确的团队 ID 和包 ID
- 在 itunesConnect 中启用了通用链接
运行苹果验证失败并出现以下错误:错误没有与网址关联的应用
running the apple validation fails with the following error:Error no apps associated with url
我认为验证器可能不起作用,但在 iOS 10 设备上运行(通用链接功能开启,添加了正确的域)单击有效链接不会触发 AppDelegate 中的委托方法
I thought maybe the validator doesn't work, but running on iOS 10 device (universal link capability on, with added correct domain to it) clicking a valid link does not trigger the delegate methods in AppDelegate
有什么想法吗?
推荐答案
3 周后...结果我的路径不正确.我的建议:
After 3 weeks... It turned out my path was incorrect. My suggestion:
在调试时将路径设置为["*", "/"]
,让一切正常工作并进行测试,然后在最后一步更新路径并仅包含支持的路径.
set paths to ["*", "/"]
while debugging, get everything to work and test, then as the final step update the path and only include supported paths.
更具体地说,我试图注册的链接是site.com/events/123123
所以我会为 /events
添加一个路径,这是错误的,会注册 site.com/events
.我不得不注册 /events/*
代替
To be more specific the link I was trying to register wassite.com/events/123123
so I would add a path for /events
which is wrong that would register site.com/events
. I had to register /events/*
instead
测试它的最简单方法是在Notes
应用程序中输入预期的链接,因为 Safari 对何时应将链接作为深层链接处理有一些奇怪的逻辑.
Also the easiest way to test it is to enter the expected links into the Notes
app, because Safari has some weird logic on when links should be handled as deeplink.
Apple 的 app-site-association 验证器没用,当深层链接真正起作用时,它仍然无法让我抱怨我的 App id.而是使用 https://limitless-sierra-4673.herokuapp.com/
Apple's app-site-association validator is useless, it's still failing for me complaining about my App id, when deeplinks actually work. Instead use https://limitless-sierra-4673.herokuapp.com/
这篇关于iOS 通用链接不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!