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

13

12

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?

Upbear answered 27/1, 2014 at 10:13 Comment(1)
Considering everything you set properly still facing issue. Then Just delete all derived data for your project , quit XCode then open your project again.Christalchristalle
U
4

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

Upbear answered 28/1, 2014 at 12:4 Comment(1)
OMG. Unbelievably worked. Discarded provisioning changes on my git.Pileous
J
36

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.

Juvenilia answered 3/11, 2015 at 16:40 Comment(5)
This worked for me. So simple/dumb and I wonder how many people had to go through some of the other solutions needlessly.Betoken
This worked for me. This should be marked as the answer.Chufa
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!Projectile
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.Dumb
Worked for me too.. Thanks for the tip. Wasted 2 hours over it and created unnecessary certs!Rainbolt
G
15

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...)

Gildea answered 26/11, 2014 at 12:6 Comment(2)
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.Keeleykeelhaul
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.Poppy
U
4

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

Upbear answered 28/1, 2014 at 12:4 Comment(1)
OMG. Unbelievably worked. Discarded provisioning changes on my git.Pileous
C
3

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

Cusec answered 16/11, 2015 at 15:28 Comment(0)
G
0

Egad… try this first: Our team encountered this exact issue trying to open an updated app with newly download Xcode 5.1 on iOS 7.1 device with a one day tardy profile. Hours later:

Download and install a new profile (as necessary) then:

Make sure the BUNDLE IDENTIFIER in your project's Xcode’s GENERAL view matches verbatim what the profile reads on your Developer WEB portal, and then be sure THAT profile is downloaded & installed in Xcode. Select that profile in your BUILD setting, and you could be solved by now (the App then installed on devices without issue), but we also noticed we could to go back to GENERAL view and the FIX button actually worked: it fixed the "not found" profile

Goshen answered 7/4, 2014 at 10:0 Comment(0)
A
0

If anyone still has this issue - and happens to have setup a workspace with individual projects, I'd suggest you from the root folder do a:

egrep -R "INPUT_THE_ID_MISSING" *

and remove directly the PROVISIONING_PROFILE = "*****" line from the file in my case, it ended happening that an old xcodeproject has a bad provisioning but I was attempting to archive from within the workspace

Austronesian answered 13/3, 2015 at 22:19 Comment(0)
O
0

Just set automatic option in Xcode.

enter image description here

Omphale answered 1/11, 2015 at 10:8 Comment(0)
B
0

Below is what worked for me in XCode 7.

I had to change provision profile in XXXXTests too...

enter image description here

enter image description here

Buttery answered 2/11, 2015 at 7:24 Comment(0)
S
0

I kept running into this issue with Xcode 7.1 and tried some of the solutions above but didn't have any success. What I found did solve the issue was going to Go > Go To Folder > ~/Library/MobileDevice/Provisioning Profiles and deleting all of the provisioning profiles.

From there I added back the provisioning profiles on an as needed basis and it seemed fix the issue. I'll post back if I find that it doesn't permanently fix the issue, but so far so good.

Sulphur answered 11/11, 2015 at 15:0 Comment(0)
N
0

I was able to get a fix done just by doing the following:

  1. Xcode -> Preferences
  2. Accounts
  3. Select your Apple ID and remove it by clicking the '-' button at the bottom
  4. Click the '+' button at bottom -> Add Apple ID
  5. Login with your Apple ID
  6. Download all certificates again
  7. Specify your profiles in your Build Settings
  8. Build
Nominal answered 10/12, 2015 at 12:16 Comment(0)
C
0

Considering everything you set properly still facing issue. Then Just delete all derived data for your project , quit XCode then open your project again.

It workes for me.

Christalchristalle answered 29/1, 2016 at 9:55 Comment(0)
A
0

I got this issue running Xcode 7.2.1 and found out that I had multiple provisioning profiles with the same name (The name on the developer portal).

By navigating to ~/Library/MobileDevice/Provisioning Profiles and removing all old provisioning profiles with the same name I was able to solve this problem.

In the terminal, navigate to the provisioning profile folder:

cd ~/Library/MobileDevice/Provisioning\ Profiles

List all provisioning profiles with your name:

grep -ar 'MyProvisioningProfileName' .  

-a means that we treat all files as ASCII text.

-r means that we will search all subdirectories listed.

This should produce a list of all provisioning profiles with the same name, e.g.

./123ha32ba-b5df-abee-12yb-12a34b216ba8.mobileprovision: <string>MyProvisioningProfileName</string>
./214hj32cf-bdfh-1ebe-bba4-7ba32b2165ha.mobileprovision: <string>MyProvisioningProfileName</string>
./321habc2f-jk32-bbae-5tga-yha234b16lka.mobileprovision: <string>MyProvisioningProfileName</string>

By deleting every provisioning profile you don't want (or deleting all and downloading a new one from the developer profile.) this problem went away.

Alston answered 18/2, 2016 at 14:55 Comment(0)
L
-1

I had this issue this morning. The only way to resolve it was removing all my provisioning profiles from

~Library/MobileDevice/Provisioning Profiles

and downloading again all my provisioning profiles from

Xcode -> Preferences -> Accounts

My project build and works now.

Leflore answered 13/11, 2015 at 12:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.