7

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 generating

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!

5
  • Have you tried fastlane? Helps a lot Commented Mar 14, 2018 at 7:18
  • @iWheelBuy Do you have any idea why I'm getting this error? Commented Mar 14, 2018 at 7:23
  • I recommend to use github.com/openbakery/gradle-xcodePlugin I use it on my project for 2 years and it works event I update Xcode Commented Mar 17, 2018 at 15:35
  • @iWheelBuy I'm using fastlane and it produces the same error. Commented Oct 21, 2019 at 12:45
  • Does anyone know how to resolve this issue? For me the distribution certificate was not created, so used -allowProvisioningUpdates option and then got this error. Commented Jan 25, 2020 at 7:26

2 Answers 2

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

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.