xcodebuild commands failed to generate iPA

会有一股神秘感。 提交于 2020-01-24 06:05:15

问题


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

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.

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

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>

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

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.

Can any one help me!


回答1:


In my organization we have different team_id for Development and Distribution

If it's the same for you then perhaps specifying the Distribution Team ID in the xcodebuild command would fix the problem.




回答2:


I hope it's useful.

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



来源:https://stackoverflow.com/questions/49271606/xcodebuild-commands-failed-to-generate-ipa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!