Xcode 5: "No such provisioning profile was found ..." error

22,422

Solution 1

Well, I solved this issue going back to a previous version stored in Time Machine, deleting all certificates and profiles both on Developer website and computer, deleted files in ~Library/MobileDevice/Provisioning Profiles and the certificates stored in Keychain Access. Also checked in project.pbxproj that no PROVISIONING_PROFILE was set.

Then, I loaded the old version in Xcode and I was able to build and archive it.

After that, the newest version worked again.

By the way, if you try to distribute an app to a device running iOS 7.1, read this

Solution 2

This took me a long time to figure out. I wasn't keen to redo all my profiles and certificates like some of the people suggested. My error message was saying ""Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “6278e001-8887-4fe4-a95c-a722c896792f”" but then when I went into ~/Library/MobileDevice/Provisioning\ Profiles and printed out all the files using ls -la I could clearly see the profile there.

enter image description here

I tried doing a Clean and Clean Build Folder.... I then tried to remove derived data. None of this worked.

But then when I simply quit Xcode and opened it again it worked

Xcode must be storing a cache somewhere when it opens up. This seems crazy to me. But what can we do.

I hope this helps someone.

Solution 3

I had the same issue this morning, and wasted about two hours desperately trying to fix it.

"Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID "0C60982A-9F45-4737-8135-505126A6DC2E", however, no such provisioning profile was found. "

What I learned is this:

If XCode ever reports that it can't find a Provisioning Profile, but just quotes the GUID, then give up trying to use your initiative, create new Profiles or Certificates, and get ready to hack.

The only way I could stop this error from happening (even after adding valid Provisioning Profiles) was to manually edit the .pbxproj file within the *.xcodeproj package.

Do a search for the GUID within this file, strip it out, and finally - finally - XCode will stop complaining.

Seriously, this is 2014, why is Apple's development environment such a dinosaur ?

Year after year, it's just bad... and they prefer to add a second programming language to it, rather than actually improve its usability.

(Sorry.. I'm in a bad mood after wasting my morning on this...)

Solution 4

Quit Xcode and re-open, this worked for me. Would try first before spending too long attempting to fix it.

Share:
22,422
Luis
Author by

Luis

Self-taught developer. I like iOS to Android, and that shows on my work :) Active cyclist, I've developed two cycling-related apps: - iGearPro - Chain Lenght Calculator

Updated on February 19, 2020

Comments

  • Luis
    Luis over 4 years

    I'm trying to distribute a new version of the app (it can be installed OTA) and I got the error:

    "Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “AdHocProfile”, however, no such provisioning profile was found. " and Xcode gets stuck in the process of automatically fix the error: automatic fix

    I have spent a lot of hours in the weekend looking for a solution here and on the internet, only to get rid of one of the two errors I got when I tried to archive the app to distribute it "Ad Hoc".

    I made some capture screens to clarify what I've done:

    Provisioning profile at Developer site:

    member center

    My account: certificates and profiles:

    certificates

    Project Settings:

    project

    Target Settings (Xcode changed them when I deleted the line PROVISIONING_PROFILE in project.pbxproj):

    target settings

    I deleted the line containing PROVISIONING_PROFILE in project.pbxproj, following the directions found in posts similar to this

    project.pbxproj

    I also removed both the stable and the beta versions of Xcode and reinstalled it from the App Store. Don't know if it's important, but I removed the beta 5.1.3 with App Cleaner, deleting all the files associated to it.

    Since Xcode does not longer show the values on the popup to choose certificates, I am not sure if I choose the correct ones.

    Could you please help me to solve this issue?

  • Michal Shatz
    Michal Shatz over 9 years
    OMG. Unbelievably worked. Discarded provisioning changes on my git.
  • Kris
    Kris over 9 years
    Thanks, I had this issue when updating an old xcode 4 app. Editing the .pbxproj file and removing the line that contained the UUID resolved the issue for me.
  • Nostradamus
    Nostradamus about 9 years
    Thanks Mike Gledhill, owe you one. I also was pulling my hair out and edited the project in textedit after seeing your post. Difficult to believe this baloney still has to be dealt with via textedit.
  • bruce1337
    bruce1337 over 8 years
    This worked for me. So simple/dumb and I wonder how many people had to go through some of the other solutions needlessly.
  • chrisamanse
    chrisamanse over 8 years
    This worked for me. This should be marked as the answer.
  • Christoph
    Christoph over 8 years
    Same here, profile id mentioned in the .xcodeproj file was in the ~/Library/MobileDevice/Provisioning\ Profiles but Xcode complained nevertheless. A simple restart solved it! Thanks!
  • Jim Range
    Jim Range over 8 years
    This worked for me with Xcode 7.2 (7C68). Seems to be a lingering bug... Just closed Xcode and re-opened it and the error went away. Definitely try quitting Xcode and re-launching it if you have this issue.
  • user591410
    user591410 about 8 years
    Worked for me too.. Thanks for the tip. Wasted 2 hours over it and created unnecessary certs!