Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcodebuild - 'Code Sign error: Provisioning profile X can't be found'

Yet another code sign error.

I'm running command:

xcodebuild -project $DIR/myproject.xcodeproj -sdk iphoneos5.0 -alltargets

and my project.pbxproj

"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Ryan"
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "/Users/ryan/12345678-9012-3456-7890-123456789012.mobileprovision";

with output

=== BUILD NATIVE TARGET myproject OF PROJECT myproject WITH THE DEFAULT CONFIGURATION (Release) ===
Check dependencies
[BEROR]Code Sign error: Provisioning profile '/Users/ryan/12345678-9012-3456-7890-123456789012.mobileprovision' can't be found

I can't find any guidance on how to do this. Ive tried putting the provision in ~/Library/MobileDevice/Provisioning Profiles and setting the profile field in project.pbxproj to just the profile ID

It is a requirement that I need to be configure this at the command line w/o Jenkins/Hudson

like image 916
Ryan Avatar asked May 04 '12 18:05

Ryan


People also ask

What is Xcodebuild?

DESCRIPTION. xcodebuild builds one or more targets contained in an Xcode project, or builds a scheme contained in an Xcode workspace or Xcode project. Usage To build an Xcode project, run xcodebuild from the directory containing your project (i.e. the directory containing the projectname.

How do I fix failed to create a provisioning profile?

3. How To Fix Xcode Failed To Create Provisioning Profile Error. To fix this error is very easy, just connect your real iOS device such as iPhone to the Mac computer with a USB line, follow the popup screen on the iPhone, then you can select your iOS device in the Set the active scheme drop down list.


1 Answers

Provisioning file goes to ~/Library/MobileDevice/Provisioning Profiles and you you can select the provisioning profile like this:

xcodebuild PROVISIONING_PROFILE=12345678-9012-3456-7890-123456789012
like image 156
jarnoh Avatar answered Oct 03 '22 14:10

jarnoh