xcodebuild code sign error provisioning profile even though all profiles are in correct folder

StackOverflow https://stackoverflow.com/questions/18447064

  •  26-06-2022
  •  | 
  •  

Question

I have a build server that checks out my xcode projects but there are a couple of issues. I need to build the app if the checkout occurs, but I'm not commiting the .xcworkspace file since more than one person works on the project.

I'm running the following code in my terminal from the project's directory:

sudo xcodebuild -configuration Debug

It eventually fails with the error:

Code Sign error: Provisioning profile '7DXXX-XXXX-XXXX....' can't be found

I opened my directory at:

~/Library/MobileDevice/Provisioning\Profiles/

The profile is definitely there, the certificate is correct, and my debug build does not code sign.

Any thoughts? Thank you.

Was it helpful?

Solution

Look for provision profile id in the profilename.mobileprovision file. Open the file and search for UUID to find this, it will be in XXX-XXX-XXXX format. Pass this as the value of PROVISIONING_PROFILE in xcodebuild command

sudo xcodebuild -configuration Debug PROVISIONING_PROFILE=<Provisioning Profile Id>

OTHER TIPS

if you have the correct certificate,and have imported it. do : sudo xcodebuild -configuration Debug PROVISIONING_PROFILE=""

It's because you run as root. The provisioning profile is installed for your specific user....

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top