微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

为什么 Xcode 12.5 `xcodebuild -archive` 会抱怨没有 AppClip 的应用程序中缺少 appclip 权利?

如何解决为什么 Xcode 12.5 `xcodebuild -archive` 会抱怨没有 AppClip 的应用程序中缺少 appclip 权利?

没有 App Clip 并在 Xcode 12.4 下成功构建的应用在使用 12.5 时在存档阶段产生错误

权利文件的关联域部分如下所示:

<key>com.apple.developer.associated-domains</key>
<array>
    <string>applinks:applinks.ourdomain.co.uk</string>
    <string>applinks:www.ourdomain.co.uk</string>
    <string>applinks:ourdomain.co.uk</string>
</array>

我的印象是,关联域中没有 <string>appclip:ourdomain.co.uk</string> 条目意味着我们没有声称拥有 App Clip。

我们 CI 上的错误输出说:

error: exportArchive: Provisioning profile "Our App Name" doesn't
include the com.apple.developer.associated-appclip-app-identifiers entitlement.
Error Domain=IDEProfileQualificationErrorDomain Code=8
"Provisioning profile "Our Profile Name" doesn't include the
com.apple.developer.associated-appclip-app-identifiers entitlement."
UserInfo={NSLocalizedDescription=Provisioning profile "Our Profile Name" doesn't
include the com.apple.developer.associated-appclip-app-identifiers entitlement.,IDEProfileQualificationError_requiredEntitlements={
    "application-identifier" = "$(AppIdentifierPrefix)uk.co.ourdomain.ourapp";
    "aps-environment" = production;
    "com.apple.developer.associated-appclip-app-identifiers" =     (
        "TeamName.uk.co.ourdomain.appname.Clip"
    );
    "com.apple.developer.associated-domains" =     (
        "applinks:applinks.ourdomain.co.uk","applinks:www.ourdomain.co.uk","applinks:ourdomain.co.uk"
    );

我没有解释为什么这包含在所需的权利中:

"com.apple.developer.associated-appclip-app-identifiers" =     (
    "TeamName.uk.co.ourdomain.appname.Clip"
);

Other people 遇到与确实有应用剪辑的应用相同的错误,但我们的没有。

解决方法

这是通过从 Apple 下载新生成的配置文件解决的,该配置文件与原始配置文件相同,只是在权利部分添加了一个空的 int *sigcheck = calloc( 5,sizeof *sigcheck ); if ( sigcheck ) { // do stuff } else { // memory allocation failed,handle as appropriate } 条目。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。