XCode and iPhone CodeSign Error quick solution

“CodeSign error: a valid provisioning profile is required for product
type ‘Application’ in SDK ‘Device – iPhone OS 2.2.1″

I hate that build error because I have seen it so many times in the last week or two.  I think every now and then I access my iPhone projects using the pre-release XCode/iPhone SDK which causes the xcode project corruption.  For reference, I have the iPhone OS 3.0 and pre-released XCode in seperate directorys.

I found  a few ways to manually edit the project file, but I knew there was a better way.  Basically the provision files and the xcode project files don’t get a long.  So here is what I did..

  1. Quite XCode
  2. Remove [don't delete] the available provisisions from this path: $HOME/Library/MobileDevice/ProvisioningProfiles
  3. Open XCode
  4. Quit XCode
  5. Add those provisions you removed in step 2, back to this path: $HOME/Library/MobileDevice/ProvisioningProfiles
  6. Open XCode
  7. Now open the Target Build settings and reset the provisioning profile settings that are listed.  For instance, select the DEBUG configuration and select the correct Provision listed.  In my case it was: iPhone Developer: Andy Peters.

I should also note that the version of XCode I am opening and closing is the current XCode for iPhone OS 2.2.1 (XCode verison 3.1.2).

Related posts:

  1. iPhone Device Identifier Number
  2. Google Calendar Sync on iPhone
  3. Make the XCode editor pretty

Tags: , , , ,

2 Responses to “XCode and iPhone CodeSign Error quick solution”

  1. Mel May 6, 2009 at 5:52 am #

    Thanks for this tutorial. It’s interesting but I cannot find the MobileDevice folder in my HD. Is it possible that this is hidden folder? If it is hidden, can I unhide it? How? Please help… :-(

    Thanks in advance

Trackbacks/Pingbacks

  1. This Week In iPhone News - April 17/2009 - April 17, 2009

    [...] XCode and iPhone CodeSign Error quick solution by Andy Peters. Interesting solution to the common “CodeSign error: a valid provisioning profile is required for product type ‘Application’ in SDK ‘Device – iPhone OS 2.2.1’” problem a lot of developers have been seeing. [...]

Leave a Reply