Google+ Badge

Wednesday, January 11, 2012

Big Xcode frustrations

My developer provisioning profile expired. After pressing [Update] twice Xcode asked if I wanted to send a message to my account manager (my boss) to renew it. I agreed to that. He got an email and renewed it. I hit [Refresh] and got the new one and tried to build. Failure again. A closer look showed a new error message telling me there are multiple provisioning certificates.

I delete one but no help so I open up Keychain Access and delete the expired on that has the exact same name as the good one. Why does the system not prompt you to save or replace or just do it automatically for you? What good is an expired certificate? It is no good at all and just another annoyance getting in my way of getting real work done.

This allows me to build for a provisioned device or the simulator but I can no longer build a release version. What the hell is going on now? I can see the release / distribution profile in the Developer Profile table in the Xcode Organizer but that table is read only. I search the web trying to find the correct wording and finally figure out you have to drag the .mobileprovision file to Xcode. You can't drag the .cer file, it has to be the .mobileprovision file. I find that on my HD and drag it to Xcode which now allows me to build release.

We need to provision another device to do some testing as I am having crashing issues on older iPhones. Everything works find on newer iPhones, both iTouches I have and the iPad. No fragmentation here. I send the device ID to my boss and he adds it to our developer profile. I press [Refresh] and the new device appears but the release profile disappears and another expired profile I deleted reappears. Screw all of that. This process is a totally screwed up mess.

I drag the distribution profile back into Xcode and delete the expired one again and all is good or so I think. I plug in the new provisioned iPhone and press (>) to run the new build of the app on it. No go but why? First off the console log window disappears again from the debug window. I click the layout button to have that appear again and it is full of UUID mismatch warnings. I copy one of those to the clipboard and it turns out the is a common problem where you have to delete the files in /Developer/Platforms/iPhoneOS.platform/DeviceSupport/ for the device version you have then restart Xcode, reattach the device and let it resync itself before you try to run it again. After all of that I get the program installed and the console window disappears again but we can start testing. So far my fixes appear to be working. I then install on one of the iTouch test devices and have to let it resync too before I can install the app update.

Pretty much I wasted a good part of the day on really stupid crap on my Mac. I also know that anytime I update my provisioning profiles I am hosed and have to delete one and redrag in the correct one. Thanks Xcode for being such a pain in the ass constantly. This is not a friendly IDE, this is not a nice way to treat developers, this is a massive waste of time just to get a freaking build ready. These are not uncommon issues. I found a lot of folks on the web having the same issues. I have not run into this craptastic fun on the Android side of things using Eclipse. I don't have to sign anything to install on any device. I don't have to provision anything. The one signature I use for a release is good for 30 years. I am not constantly hassled to be doing something I should be able to legally do. I don't have developer and distribution certificates expire at different times. I don't have and IDE that gives less than helpful error messages that I must search the web to have any hope of decoding.

Some of this might not happen if I was the Apple account owner and the sole developer. That part of the equation has been a huge headache repeatedly with Apple. I finally have to give up using my work email account and use my personal email account with Apple as they could not get their own system straightened out. It gets to the point you hate to try and build the app on the Mac. I just don't trust it do it correctly ever.