I think most of us feel your pain. The code signing stuff is a nightmare. I've got a pretty solid handle on it now, having had to compiler over a dozen different projects in either Ad Hoc or Release modes.
Like Breeno, I haven't been able to identify one thing that causes or fixes the problems, either. Sometimes certain tricks work, other times they don't. Here are some things that might help sometimes:
Make sure that your mobile device provisioning certificates are NOT named after your UUID. Import them directly into the folder, or through iTunes, NOT through Xcode.
If Xcode can't find the right provisioning profile for your identity, set it to default, remove your identity (set field to blank, or just to "iPhone Developer"), then create a new iPhone project and immediately go into the Targets menu and set the code signing identity to "iPhone Developer: {your name}". Now try the provisioning drop down in this new project. If it works (seems to be about 75%), then you should be able to go back to the old project and select it.
If it doesn't find the provisioning profiles after that, try restarting Xcode and/or rebooting your machine.
If you're compiling for Release or Ad Hoc, make sure you have specified your "Code Signing Entitlement" to a property list in your Resources folder. That plist should have one node called "get-task-allow", which should be a Boolean set to NO (unchecked).
If all else fails, start from scratch, with new certs, provisioning profiles, etc.
It also helps if there's a full moon, and burning incense may or may not fix the problem. You may want to do the process in the nude while sitting in Lotus. It won't help, but it'll give a good laugh to anybody who walks in on you..
|