Monday, July 6, 2009

iPhone Provisioning File Drama: Part I

My email to Apple technical support:

Wow, what a nightmare trying to get your xcode project to run on an iphone. I'd been doing okay until I purchased a new iPhone. With the new iphone I can no longer get my project to run on the device.

Here's what I've done.

I created a new provisioning profile for the new iPhone via developer.apple.com.
Saved the profile to disk.
I opened up Organizer from within xcode.
Plugged in my new iPhone.
Added the provisioning file.
So far so good.
Now I open up my existing xcode project, and try to build/run.
I get the error message:
"Can't run "iYipe" on the iPhone "Kevin Kinell's iPhone" The iPhone "Kevin Kinell's iPhone" doesn't have the provisioning profile with which the application was signed. Please add the provisioning profile via the Organizer, or check the "Code signing Identity" build setting.

Ok. Then search google for 2 hours.

From there, I tried:

Tried close/open xcode, restarting, connecting/disconnecting iphone etc. No luck on this.

Deleting the file in:
/users/Library/MobileDevice/Provisioning Profiles/

I tried that because of the situation of two iphones and read somewhere this causes conflict. Deleting this file caused more problems and now my application wasn't code signed and I couldn't get it back... so I restored the file I deleted.

Generating a new provisioning file. Same problems.

Editing the project settings and changing the code signing identity, restarting xcode, setting it back. Still same error.

Tried editing and then removing the info.plist file. This caused other errors, mainly that I had no info.plist file. Restored it back to original state.

So, let's try the old iPhone. Guess what? That works like a charm. But, that doesn't really help me get the application installed on the new iPhone.

And before I go any crazier, figured I would write in to you.

Other random pieces of info:
Trying to run on: Device - 3.0 | Debug
iPhone is new 3GS, 32gb
Apple developer ID: [removed]
Apple developer email: [removed]
Organizer shows the correct provisioning profile.

Let me know if you have any other questions.

Thanks,

-Kevin

1 comment:

karthik said...

well,its good.we need what are all the protective mechanisms available for iphones.