xcodebuild 命令无法生成 iPA

Ash*_*hah 6 xcodebuild cocoapods swift

在 xcode 9.2 中,我使用自动签名生成存档,使用-allowProvisioningUpdates密钥通过 xcodebuild 命令生成开发人员证书和配置文件。

但是当通过 xcodebuild 命令生成 iPA 时,该存档会低于错误。

Details:  Unable to close provisioning ledger entry because not all of its subentries are closed
Object:   <IDEProvisioningLedgerEntry: 0x7f925ced3840>
Method:   -closeWithError:
Thread:   <NSThread: 0x7f925a734df0>{number = 4, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
Run Code Online (Sandbox Code Playgroud)

使用 Xcodebuild 命令生成存档

xcodebuild -exportArchive -archivePath '/path/to/archive/Test.xcarchive' -exportOptionsPlist '/path/to/exportOptions/ExportOptions.plist' -exportPath '/path/to/archive/' PRODUCT_BUNDLE_IDENTIFIER="bundle_id" DEVELOPMENT_TEAM="development_team_id" -allowProvisioningUpdates
Run Code Online (Sandbox Code Playgroud)

并导出 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>method</key>
    <string>ad-hoc</string>
    <key>signingCertificate</key>
    <string>iPhone Developer</string>
    <key>signingStyle</key>
    <string>automatic</string>
    <key>stripSwiftSymbols</key>
    <true/>
    <key>teamID</key>
    <string>TEAM_ID</string>
    <key>uploadBitcode</key>
    <true/>
    <key>uploadSymbols</key>
    <true/>
</dict>
</plist>
Run Code Online (Sandbox Code Playgroud)

使用 Xcode GUI 一切正常,开发人员、分发证书和配置文件正在生成

但是当在终端中使用 xcodebuild 时,只有开发人员证书会在存档时生成和开发人员配置文件。但是分发证书不是通过 xcodbuild 生成的。

谁能帮我!

NSA*_*Adi 0

在我的组织中,我们team_id对开发和分发有不同的规定

如果您的情况相同,那么也许在 xcodebuild 命令中指定分发团队 ID 可以解决问题。