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

时间:2021-05-21 12:59:55

标签: xcode12.5

没有 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 遇到与确实有应用剪辑的应用相同的错误,但我们的没有。

1 个答案:

答案 0 :(得分:0)

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