I am using Xcode to build .ipa export files for submission to Apple. I have been doing so successfully before the upgrade from Xcode 10 to Xcode 11.
Some of the errors we were experiencing suggested that we needed to completely uninstall Xcode because we had a beta version on previously and the old version of Xcode beta was probably causing the issues. I decided to just wipe the entire Mac clean with a system reset to avoid any copy of Xcode Beta or its settings from being on the machine. So it is now a completely fresh install of Mac OS. I have reinstalled Xcode.
I've imported my old certificates into the Keychain and verifed I only have valid certificates listed.
I run two commands. I first create an archive. Then I use the archive to export the ipa:
xcodebuild -allowProvisioningUpdates -workspace my_app.xcworkspace -scheme XXXX -archivePath build-dev/XXXX.xcarchive archive
xcodebuild -exportArchive -archivePath build-dev/XXXX.xcarchive -exportOptionsPlist release.plist -exportPath build-dev
Note that I have replaced the scheme with XXXX and the bundle IDs in my examples have been replaced with 'my.bundle.id'.
This process works to do a development .ipa. However, when I go to create a Testflight or Production .ipa I get errors.
The first command runs with no errors and I have the archive file created at "build-dev/XXX.archive". The second command generates errors:
2019-09-30 12:11:46.444 xcodebuild[10674:326155] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/10/8g5xrhr56wz6sgttzh0_s8fr0000gn/T/XXXX_2019-09-30_12-11-46.444.xcdistributionlogs'.
2019-09-30 12:11:56.534 xcodebuild[10674:326208] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-14936/IDEFoundation/Provisioning/Logging/IDEProvisioningLedger.m:172
Details: Unable to close provisioning ledger entry because not all of its subentries are closed
Object: <IDEProvisioningLedgerEntry: 0x7ff7568b7a00>
Method: -closeWithError:
Thread: <NSThread: 0x7ff750b16af0>{number = 14, name = (null)}
Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide.
error: exportArchive: Create certificate
Error Domain=IDEProvisioningErrorDomain Code=19 "Create certificate" UserInfo={IDEDistributionIssueSeverity=3, IDEProvisioningError_UserInfoKey_IDEProvisioningUserAction=<IDEProvisioningCreateTeamOwnedCertificateUserAction: 0x7ff756acf0c0>, NSLocalizedRecoverySuggestion=Create a new Apple Distribution certificate for your team., NSLocalizedDescription=Create certificate}
error: exportArchive: No profiles for 'my.bundle.id' were found
Error Domain=IDEProfileLocatorErrorDomain Code=1 "No profiles for 'my.bundle.id' were found" UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription=No profiles for 'my.bundle.id' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'my.bundle.id'.}
This is my release.plist file.
<?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>app-store</string>
<key>teamID</key>
<string>MY-TEAM-ID</string>
<key>compileBitcode</key>
<false/>
</dict>
</plist>
I am able to build from within Xcode successfully. It is only the command line export that I am having issued with.
The bundle id exists on my developer.apple.com account. I have a valid iOS Development and iOS Distrobution certificate in Xcode Preferences.
I am not certain why I am getting these errors.