Xcode 5: “No such provisioning profile was found …” error

久未见 提交于 2020-01-01 04:21:58

问题


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:

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:

My account: certificates and profiles:

Project Settings:

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

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

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?


回答1:


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.

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.




回答2:


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




回答3:


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




回答4:


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




回答5:


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




回答6:


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




回答7:


Just set automatic option in Xcode.




回答8:


Below is what worked for me in XCode 7.

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




回答9:


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.




回答10:


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



回答11:


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.




回答12:


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.




回答13:


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.



来源:https://stackoverflow.com/questions/21378130/xcode-5-no-such-provisioning-profile-was-found-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!