Apple iPhone Provisioning Hell: have you tried restarting XCode?
I just spent way too long trying to get my iPhone app transferred to my phone for testing.
To Apple's credit, their web site is very logically laid out and takes you through the numerous hoops you have to jump through quite well. Unfortunately, after setting up my team, creating my certificates, registering my device, setting up an App ID (hint: use * for your Development Provisioning Profile so that you can use any bundle identifier with it), downloading my provisioning profile and, finally, installing it XCode and syncing it to my iPhone, I got the following error while trying to build and deploy to my iPhone:
CodeSign error: a valid provisioning profile is required for product type 'Application' in SDK 'Device - iPhone OS 2.2'
I then proceeded to twiddle with everything I could possibly think of and started Googling like a mad man and twiddling with things that the pages I found told me to twiddle with. Unfortunately, of this twiddling produced any results.
In the end, what fixed it was restarting Xcode.
I only tried it after reading a comment on this post. Mr "v", whomever, you are, thank you!
After restarting, my build completed successfully, but, this time, it wouldn't deploy to the phone. My new error was:
The the device doesn't have provisioning profile the application was signed with.
During my twiddling, I had created a second provisioning profile, deleted the first one, and transferred the second one to my phone. Even though the first provisioning profile did not exist either in the Organizer in XCode or on the phone, I was getting this error. Thinking that a similar sort of caching must be at play, I proceeded to do the following:
- Delete both the provisioning profiles under ~/Library/MobileDevice/Provisioning Profiles (interestingly, they were both there, even though I had removed the other one from the organizer in XCode)
- Restart XCode
And that did it. To tell you the truth, I don't even know if Step 1 was necessary. It may just be that XCode was caching something and the restart did the trick yet again.
So, all this to say, if you're in iPhone Provisioning Hell, you may want to try restarting XCode first, before pulling out your hair.
Comments
by pete on 2009-01-04 17:37:39
by Thomas on 2009-01-03 02:02:30
by Kiran on 2009-01-06 10:17:01
by Sam on 2009-04-29 00:32:05
by Jojo on 2009-04-29 16:57:01
by Kris on 2009-04-29 17:57:08
by Sly Gryphon on 2009-06-19 14:38:25
by Matteo on 2009-03-11 16:37:31
by Donald Bellenger on 2009-05-08 18:03:49
by Chris on 2009-08-25 04:31:09
by Matt Wyman on 2009-07-15 18:47:27
by Sab on 2009-08-27 10:28:54
by Matt on 2009-08-29 21:37:02
by HNW999 on 2009-10-12 03:51:36
by manicaesar on 2009-08-17 08:09:21
by Aral Balkan · 2009 retrospective on 2009-12-31 18:27:14
by Chris on 2010-04-20 01:51:29
by Chris on 2010-06-19 12:00:57
by Jon on 2011-03-06 22:36:27
by mike lock on 2011-03-04 09:35:19
by Jim on 2011-06-15 16:16:33
by capture flash video on 2011-07-20 02:35:12