无法在命令行上从Xcode导出存档

dea*_*rne 6 xcode provisioning-profile ios-provisioning xcode9.3

我有一个项目,我正在尝试导出企业归档.

这通过Xcode的界面(的Xcode 9.3版本(9E145))的作品完美,但我想通过命令行(这样我就可以自动完成这一对我们的CI)来做到这一点.

我正在从Xcode内部导出相同的存档,所以我有理由相信存档本身已经正确创建.

我正在运行的命令是

xcodebuild "-exportArchive" "-archivePath" "archive.xcarchive" -exportPath . -exportOptionsPlist ./export_options.plist
Run Code Online (Sandbox Code Playgroud)

而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>
Run Code Online (Sandbox Code Playgroud)

我得到的错误是

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 **
Run Code Online (Sandbox Code Playgroud)

我已经从Xcode中检查了我的导出,并且它使用了我在export_options.plist中指定的相同证书和配置文件.

有人建议吗?