xcodebuild命令无法生成iPA

问题描述 投票:2回答:2

在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.

使用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

和导出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>

使用Xcode GUI所有工作正常,开发人员,分发证书和配置文件都是生成

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

谁能帮我!

swift cocoapods xcodebuild
2个回答
0
投票

在我的组织中,我们有不同的team_id用于开发和分发

如果它对您来说是相同的,那么可能在xcodebuild命令中指定分发团队ID将解决问题。


0
投票

我希望它有用。

xcodebuild archive -workspace“xxx.xcworkspace”-scheme“xxx”-configuration Debug -archivePath build / xxx.xcarchive

xcodebuild -exportArchive -archivePath build / xxx.xcarchive -exportPath build / xxx -exportOptionsPlist ExportOptions.plist

enter image description here

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