在开发中获取的 Apple 关联文件,但未在 TestFlight 和 App Store 中获取 [英] Apple association file fetched in development but not in TestFlight and App Store
问题描述
通用链接在开发中工作得很好,但是一旦我签署了应用程序并将它们部署到 TestFlight 和 App Store,它看起来像没有获取 apple-app-site-association,因此该应用程序没有注册打开通用链接.
Universal links work perfectly fine in development, but once I sign the applications and deploy them to TestFlight and App Store, it looks like the apple-app-site-association is not fetched and therefore the app isn't registered for oppening the universal links.
1./.well-known/apple-app-site-association 文件:
{
"applinks": {
"apps": [],
"details": [{
"appID": "myteamid.com.mycompany.appName",
"paths": ["*"]
}]
}
}
服务器部分看起来不错,因为每当我通过手机上的电缆运行应用程序时,它都会成功获取.
The server part looks OK, since it is successfuly fetched whenever I run the app via the cable on my phone.
App Search API Validation 工具返回此链接到应用程序:
App Search API Validation tool returns this for Link to application:
需要采取行动
- 无法提取通用链接所需的信息.学习怎样实施推荐的通用链接.
- 错误没有具有域权限的应用
- 用于验证深层链接双重身份验证的权利数据来自您应用的当前发布版本.此数据可能需要 48 小时才能更新.
2) 能力:
关联域 - 打开域列表:应用链接:link.mycompany.com
Associated domains - ON with Domain list of: applinks: link.mycompany.com
我开启的其他功能是:推送通知和后台模式.
Other things I have turned on are: Push Notifications and Background Modes.
3) 配置文件:我在添加通用链接和推送通知后创建了一个新的,它包括:
3) Provisioning profile: I created a new one after adding the Universal links and Push notifications and it includes:
能力:
关联域,
Associated Domains,
列表项
游戏中心,
应用内购买,
权利:
获取任务允许,
get-task-allow,
应用环境,
com.apple.developer.related-domains,
com.apple.developer.associated-domains,
com.apple.developer.team-identifier,
com.apple.developer.team-identifier,
应用标识符,
beta-reports-active,
beta-reports-active,
钥匙串访问组
4) 在安装应用程序时,它在试飞中的行为与通过电缆加载时的行为不同:
4) While installing the app, it behaves different in test flight then it does when loading via cable:
通过电缆我可以看到apple-app-site-association文件的成功http请求,最后形成进程swcd:"Added service 'applinks', appIDmyteamid.com.mycompany.appName",域link.mycompany.com"
Via cable I can see the successfull http request for the apple-app-site-association file and finally form the process swcd: "Added service 'applinks', appID 'myteamid.com.mycompany.appName', domain 'link.mycompany.com' "
试飞 - 安装时没有 http 请求的迹象,如果我之前通过电缆安装了该应用程序,则会显示以下行:已删除服务 'applinks', 应用 ID 'myteamid.com.mycompany.appName',域 'link.mycompany.com'(已删除域)"
Test flight - when installing there is no sign of http request and the following line is shown if I previously had the app installed via cable: "Removed service 'applinks', app ID 'myteamid.com.mycompany.appName', domain 'link.mycompany.com' (removed domain) "
这当然会导致这样一个事实:每当我通过 TestFlight 或 Description 安装应用时,通用链接都不起作用.
This of course results in the fact that whenever I install the app via TestFlight or Describution, the Universal links do not work.
知道哪里出错了吗?
推荐答案
在 Apple 开发人员技术支持的帮助下,我终于找到了这个问题的根源.在我的(cordova)项目文件夹中有两个文件:
I finally got to the bottom of this with help of Apple Developer Technical Support. In my (cordova) project folder there are two files:
权利-调试.plist权利-Release.plist
Entitlements-Debug.plist Entitlements-Release.plist
当我将值 applinks:mywebpage.com 添加到 Capabilities->Associated Domains->Domains 时,Entitlements-Debug.plist 得到了以下几行:
When I add the value applinks:mywebpage.com to Capabilities->Associated domains->Domains, the Entitlements-Debug.plist got the lines:
<key>com.apple.developer.associated-domains</key>
<array>
<string>applinks:mywebpage.com</string>=
</array>
但是 Entitlements-Release.plist 没有改变.我为解决这个问题所做的是从 Entitlements-Debug.plist 中复制粘贴生成的行.在此之后,我执行了与之前完全相同的存档和上传过程,一切正常.
BUT the Entitlements-Release.plist did not change. What I did to solve the issue is to copy-paste the generated lines form the Entitlements-Debug.plist. After this, I did the exact same Archive and upload process as before and everything worked fine.
这篇关于在开发中获取的 Apple 关联文件,但未在 TestFlight 和 App Store 中获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!