我有一个项目,我试图从中导出企业档案。
这可以通过 Xcode 界面(Xcode 版本 9.3 (9E145))完美地工作,但我试图通过命令行来完成它(所以我可以在我们的 CI 上自动执行此操作)。
我正在导出与 Xcode 内部相同的存档,因此我有理由确定存档本身已正确创建。
我正在运行的命令是
xcodebuild "-exportArchive" "-archivePath" "archive.xcarchive" -exportPath . -exportOptionsPlist ./export_options.plist
export_options.plist 的内容是
<?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>compileBitcode</key>
<false></false>
<key>method</key>
<string>enterprise</string>
<key>provisioningProfiles</key>
<dict>
<key>com.correct.app.identifier</key>
<string>XC iOS: com.correct.app.identifier</string>
</dict>
<key>signingCertificate</key>
<string>iPhone Distribution: MYBRAND</string>
<key>teamID</key>
<string>ABCDEFGHI</string>
</dict>
</plist>
我得到的错误是
2018-04-07 16:54:02.104 xcodebuild[67144:5293266] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/c4/t3_jplmx5qn7dkxx95rqv2qh0000gn/T/MyBrand_2018-04-07_16-54-02.095.xcdistributionlogs'.
2018-04-07 16:54:04.108 xcodebuild[67144:5293266] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fbf2ad5b240>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'com.correct.app.identifier' were found\" UserInfo={NSLocalizedDescription=No profiles for 'com.correct.app.identifier' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS In House provisioning profiles matching 'com.correct.app.identifier'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}"
)}
error: exportArchive: No profiles for 'com.correct.app.identifier' were found
Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'com.correct.app.identifier' were found" UserInfo={NSLocalizedDescription=No profiles for 'com.correct.app.identifier' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS In House provisioning profiles matching 'com.correct.app.identifier'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.}
** EXPORT FAILED **
我已经从 Xcode 内部检查了我的导出,它使用的证书和配置文件与我在 export_options.plist 中指定的相同。
有什么建议吗?