2

我在将应用程序打包为 IPA 时遇到问题PackageApplication。协同设计验证因“不满足其指定要求”而失败:

+ /usr/bin/codesign --verify -vvvv -R=anchor apple generic and (certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)) /var/folders/8j/n5d5y1bj6wz3l8gs_djqn3400000gn/T/8xonyTiAuP/Payload/Planner.app
Program /usr/bin/codesign returned 3 : [/var/folders/8j/n5d5y1bj6wz3l8gs_djqn3400000gn/T/8xonyTiAuP/Payload/Planner.app: valid on disk
/var/folders/8j/n5d5y1bj6wz3l8gs_djqn3400000gn/T/8xonyTiAuP/Payload/Planner.app: does not satisfy its designated Requirement
/var/folders/8j/n5d5y1bj6wz3l8gs_djqn3400000gn/T/8xonyTiAuP/Payload/Planner.app: explicit requirement satisfied

这里指定了什么要求?!?

我正在使用 xcodebuild 构建:

xcodebuild -workspace MyWorkspace.xcworkspace -scheme Planner -ask iphoneos clean build archive

它为我创建了一个 Xcode 存档,~/Library/Developer/Xcode/Archives到目前为止一切都很好。

然后我读到人们使用 PackageApplication 但对我来说失败了:

 xcrun -sdk iphoneos PackageApplication -v path/to/Planner.app -o Planner.ipa --sign 9990807058544973D70EA9A9F3BB3949D51C0983 --embed my_profile.mobileprovision

出现上述错误。

我在这里缺少什么部分?还有另一种方法可以做到这一点吗?

这是 Xcode 4.5。

4

1 回答 1

1

.app您可以通过运行以下命令来检查文件的指定要求:

codesign -d -r- path/to/file.app

您的输出应包含以 . 开头的行designated =>。接下来是您指定的要求。此输出的一个示例是:

designated => identifier "com.organization.project" and certificate root = H"abcdef0123456789abcdef0123456789abcdef12"

-d标志显示信息,标志-r-将需求写入stdout.

您可以使用 Apple 的代码签名要求语言页面来解释这些要求的含义。

如果您想缩小哪个特定需求失败的范围,您可以通过输入以下命令单独运行测试:

codesign -v -R="certificate root = H\"abcdef0123456789abcdef0123456789abcdef12\"" /path/to/file.app

-v标志对您的应用程序执行验证,并且该-R标志通过明确要求进行测试。

于 2016-04-20T21:48:16.633 回答