Xcode continuous integration provisioning profile

2019-01-10 05:10发布

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?

标签: xcode5
11条回答
做自己的国王
2楼-- · 2019-01-10 05:33

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.

查看更多
够拽才男人
3楼-- · 2019-01-10 05:34

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:

  1. Go to your project folder
  2. Right click on YOU_APP.xcodeproj and choose Show Package Contents
  3. Edit project.pbxproj with (for example TextMate2 or somethig like this)
  4. NOW Attention. I found everything where this UUID (wrong UUID) will be displayed and just replaced with my i created and have been using for several time. I replaced 13 times.
  5. done. Just compile and thats it.

You will not believe but it worked after spending a lot of time. =)

查看更多
戒情不戒烟
4楼-- · 2019-01-10 05:36

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.

查看更多
姐就是有狂的资本
5楼-- · 2019-01-10 05:37

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

查看更多
戒情不戒烟
6楼-- · 2019-01-10 05:40

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.

查看更多
登录 后发表回答