Reputation: 20237
I am trying to setup continuous integration in Xcode 5 on Mavericks. If I have a bot do a new clean project build, it completes with no errors. If I have the bot do the build on my actual project, I get the following error:
No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX”, however, no such provisioning profile was found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.0'
If I pull latest source on the server machine and build/archive it on the server it works as expected. All expected certificates and public keys are included in keychain. I have tried to update all provisioning profile settings in the project and build target the scheme points at. Does anyone have any ideas how to resolve this error?
EDIT: After cracking open the project file and looking at the UUID, from what I can tell the UUID for the provisioning file it can't find does exist. Perhaps this is some kind of permission issue with the build not having access to the profile or keychain certificate?
Upvotes: 36
Views: 36976
Reputation: 777
I had the same problem and finally managed to make it work.
First of all, I added my server to my developer team but I had the same error as you.
Then I copied my key from user keychain
to system keychain
as indicated here but it was still not enough.
And finally, I copied the provisioning profiles from ~/Library/MobileDevice/Provisioning\ Profiles/
to /Library/MobileDevice/Provisioning\ Profiles/
(in fact I copied all the MobileDevice directory because it didn't exist).
And now, I have a working continuous integration giving me an ipa which I can download on my Mac or install over the air on my devices.
I don't know why I had to do this, but I hope it will work for you too.
Upvotes: 63
Reputation: 690
@amrsd Thanks. I see now that a lot of people are copying the profiles manually from their "Provisioning Profiles" folder in "~/Library/MobileDevice" with success (including myself). If this is the route you're taking as well, quit copy+pasting and symlink it!
$ sudo -i
# mkdir /Library/MobileDevice; ln -s /Users/myuser/Library/MobileDevice/Provisioning\ Profiles/ /Library/MobileDevice/
-- where myuser is your username.
Upvotes: 0
Reputation: 114
after searching how to solve this problem , after spending 1 whole day in front of my keyboard , looking through all pages and ideas how to solve this i actually found something interesting out.
Something came on my mind mentioned (edit YOU_APP.xcodeproj). So I SOLVED THIS:
You will not believe but it worked after spending a lot of time. =)
Upvotes: 3
Reputation: 41
Hi I had the same issue and the problem was I had the certificates in my login keychain and the build script was looking in System keychain. I copied the certificate in system key chain also and now Xcode was able to use the provisioning profile for the build
Upvotes: 4
Reputation: 3389
Actually the solution is way simpler than copying provisioning profiles around or the like. All you need to do is setup Xcode Server correctly.
I am using Xcode 6.0.1 (6A317) with Xcode Server 3.2.1 (13S5179). While I thought that Xcode Server would use the provisioning profiles from my Xcode installation, it does not. It has its own folder at /Library/Developer/XcodeServer/ProvisioningProfiles/
, whereas Xcode would use ~/Library/MobileDevice/Provisioning\ Profiles/
.
So the solution is:
Add your developer accounts to Xcode Server. It will then automatically download all necessary provisioning profiles automagically so your CI builds finally have access to the provisioning profiles. You add an account by clicking that Edit...
button in the Builds
section of Xcode Server as you can see in the screenshot.
Upvotes: 1
Reputation: 3713
Removing the whole ~/Library/Developer/XCode
folder should fix the caching issue. Then the provisioning profiles located in ~/Library/MobileDevice/Provisioning Profiles/
should be found properly by xcode.
Upvotes: 0
Reputation: 1673
I was getting the same error and none of the above answers worked for me. I referenced This blog and copied my provisioning profiles from the ~/Library/MobileDevice/Provisioning Profiles/ directory to the /Library/Server/Xcode/Data/ProvisioningProfiles directory and I still got the same error.
So I opened Xcode and synchronized my profiles with the provisioning portal. If you are unfamiliar, go to Preferences -> Accounts -> , highlight the developer team and click "View Details". Then highlight the distribution code signing identity in "Signing Identities" and click on the refresh button in the bottom left corner. I did this from the server, however, I'm sure you could refresh your provisioning profiles on your development mac and then copy them to the server.
This process refreshes the provisioning profiles in the ~/Library/MobileDevice/Provisioning Profiles/ directory. I then reattempted the copy process to /Library/Server/Xcode/Data/ProvisioningProfiles from ~/Library/MobileDevice/Provisioning Profiles/ and the Xcode bot successfully found the provisioning profile during the next integration.
As a note, I tried signing out of the Xcode service's developer team and signing back in and that peculiarly did not work for me. Theoretically that should accomplish the same thing.
Like others have mentioned, I would copy all of the profiles rather than finding only the Ad Hoc profile you are looking for. The reason is that maybe, like in my case, the Xcode bot was attempting to archive with the development profile and "Development Profile" is much easier to debug than "4F96F173-7EBE-4892-B283-52489DE2F409".
If this still does not work, I suggest following the link above and go through the certificate process; you take the certificate from your developer computer and copy it into the system folder of the Keychain Access application on your server.
Just to add a note since this also gave me a big headache, the simulator for Xcode bots may be located at /var/_xcstest/Library/Application Support/iPhone Simulator/. That is where I found it on our server but I doubt it would be different for others. I had to find it because the Localizable.strings file was not being updated in the simulator and tests were failing. Hope this helps.
Upvotes: 1
Reputation: 1663
I tried all of the answers here before sitting back and thinking that it couldn't be this hard. Searched again and found this Apple OS X Server (Xcode CI service) can't find provisioning profiles
I needed to use the correct team provisioning profiles. This page also links to a good tutorial as well.
Upvotes: 0
Reputation: 307
I had the same problem since switching to Xcode 5. My solution was different.
Since the error message said "Your build settings specify a provisioning profile with the UUID xxxxxx", I checked the file containing my build setting (myproject.xcodeproj/projecjt.pbxproj).
There I found a line with exactly that UUID. After deleting the line (of course a made a backup of the file first), everything worked again.
Upvotes: 23
Reputation: 2593
I had the same problem: I've added the provisioning profiles to /Library/Server/Xcode/Data/ProvisioningProfiles but got this error. The solution is to change permissions for the provisioning profiles, so everyone in the system can read them.
Upvotes: 0
Reputation: 11
I kept searching the net for the past few weeks trying to establish Continuous Integration through Jenkins & when failed through OS X Server Bots, both failed with the same exact issue.
Copying the Provisioning Profiles from "~/Library/MobileDevice/Provisioning Profiles/" to "/Library/MobileDevice/Provisioning Profiles/" was the only key.
Just two points to take care off :-
1-If you are using OS X Lion, take care that your ~/Library folder will not appear in Finder as it is set as invisible; Please refer to http://www.macworld.com/article/1161156/view_library_folder_in_lion.html to see it.
2-Don't bring the provisioning profile on your own (e.g. download it from MemberCenter or so, ... ) just copy the profiles exiting in your ~/Library/...; their naming is different; they are all named by the UUID, e.g.3D19E524-9E2A-45C2-942C-F30AC3ACF0CC*.mobileprovision*
Upvotes: 1