从 xcode 13.2.1 到 14.2 的哪些变化会影响应用程序的权利?

问题描述 投票:0回答:1

我们有一个 Xamarin iOS 应用程序,它正在使用 XamariniOS@2 任务在 DevOps 管道中构建。这种方法多年来一直运行良好,直到几个月前我们更改了 vm 映像,以便将 xcode 版本更新到 14.2 以支持 iOS 16+。从那时起,由于错误,安装到设备失败:

Application is missing the application-identifier entitlement.

分析应用程序文件显示使用 xcode 13.2.1 构建的 IPA 具有权利。

@-Mac-mini Downloads % codesign -d --entitlements - --xml  Inform.Forms.iOS.**macOS-11**.app 
Executable=/Downloads/Inform.Forms.iOS.macOS-11.app/Inform.Forms.iOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>get-task-allow</key>
    <false/>
    <key>com.apple.developer.team-identifier</key>
    <string>[OUR APP ID]</string>
    <key>application-identifier</key>
    <string>OUR APP ID].com.b2wsoftware.inform</string>
    <key>keychain-access-groups</key>
    <array><string>OUR APP ID].com.b2wsoftware.inform</string>
    </array>
</dict>
</plist>

但是针对 xcode 14.2 生成的 IPA 应用程序运行相同的 codesign 语句不会产生任何权利。

@-Mac-mini Downloads % codesign -d --entitlements - --xml  Inform.Forms.iOS.**macOS-12**.app
Executable=/Downloads/Inform.Forms.iOS.macOS-12.app/Inform.Forms.iOS
-- no output --

两者之间没有代码差异,唯一的变化是针对具有不同默认 xcode(xcode 13.2.1 到 14.2)的不同 vm 映像(macOS-11 到 macOS-12)。

有谁知道 xcode 中的哪些更改可能会影响我们无法正确生成权利的原因以及如何纠正该问题?

我尝试添加一个自定义权利文件,其中列出了默认生成的权利,但它似乎忽略了它们。我什至尝试将 CodeEntitlements 参数添加到 XamarainiOS 任务中:

args: '/p:CodesignEntitlements=Entitlements.plist'

行为没有改变。 Add 仍然无法安装,并出现错误 “应用程序缺少应用程序标识符权利。”

ios xcode xamarin azure-pipelines
1个回答
0
投票

这就是我的样子:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>application-identifier</key>
    <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
    <key>get-task-allow</key>
    <false/>
    <key>beta-reports-active</key>
    <true/>
    <key>keychain-access-groups</key>
    <array>
        <string>$(AppIdentifierPrefix)$(CFBundleIdentifier)</string>
    </array>
    <key>aps-environment</key>
    <string>production</string>
</dict>
</plist>

看起来非常相似,主要区别在于现在只是推断标识符。

© www.soinside.com 2019 - 2024. All rights reserved.