Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 11 Error Exporting IPA No profiles for 'my.bundle.id' were found

Tags:

xcode

ios

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.

like image 801
Daryl Avatar asked Sep 30 '19 20:09

Daryl


People also ask

What is Allowprovisioningupdates?

Aug 14, 2020. Since Xcode 9, Apple provides automatic code signing identity management from the command line by using the xcodebuild command. Using the “allowprovisioningupdates” flag, you can enable code signing; however you may get errors like: Your session has expired.

How to enable Automatic signing in Xcode?

Open the project using Xcode. Select the root project directory, and go to the Signing and Capabilities tab. Here, you can either check Automatically manage signing or do the signing manually. If you check the Automatically manage signing checkbox, then you will just need to select the Team from the drop-down list.


1 Answers

Create the archive file and export an IPA file for TestFlight from Xcode using the GUI. During that process Xcode was able to create the certificate it was missing. Now I can run the command line Xcode commands successfully.

Steps to use GUI to create the certificate needed:

  • Open Xcode
  • Select Product
  • Select Archive (If Archive is gray, do a build for the Generic iOS Device first.)
  • Select Distribute App
  • Select App Store Connect from radio button list and then click Next.
  • Select Export from radio button list and then click Next.
  • Check Generate an Apple Distribution certificate.
  • Export the certificate as a backup and to share with fellow developers.

Below is a screen shot of the "Generate an Apple Distribution Certificate" window that needs to be clicked in the GUI process.

enter image description here

like image 165
Austin Avatar answered Sep 27 '22 20:09

Austin