本文介绍了xcodebuild命令无法生成iPA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

In xcode 9.2 I'm generating archive using automatic signing, Developer certificate and provisioning profile are generating through xcodebuild commands using -allowProvisioningUpdates key.

但是,当通过xcodebuild命令生成iPA时,该归档文件出现以下错误时。

But when generating iPA through xcodebuild commands with that archive getting below error.

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命令生成存档

Using Xcodebuild command to generate archive

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选项的详细信息:

And Export plist options details:

<?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都可以正常工作,开发人员,分发证书和配置文件正在生成

Using Xcode GUI all working fine, Developer, Distribution certificate and provisioning profile are generating

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

But when using xcodebuild in terminal only developer certificate is generating and developer provisioning profile when archiving. but Distribution certificate is not generating through xcodbuild.

有人可以帮助我吗!

推荐答案

我希望它会有用。

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

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

这篇关于xcodebuild命令无法生成iPA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 13:03