GadgetWerx
Aspiring developer
Profile
Posts: 101
Reg: Jul 05, 2012
Redlands
6,010
09/29/12 01:26 AM (13 years ago)

Codesign error (The Provisioning Dance)

OMG! Apple makes provisioning a COLOSSAL pain in the butt. You might be interested in what I have been through today: I recently upgraded to iOS 6, and changed one of my 3 BT filenames that I was tinkering with. The app worked in the simulators, but was FUBAR "Build Failed" for my iPhone 3gs. So, after reviewing the forum for ideas I decided to start from scratch and really figure out this Provisioning stuff. Here is my setup: BT 2.0 Mac OSX 10.7.4 iphone 3gs (ios 6.0) ipad 3 (ios 6.0) Xcode 4.5 Ultimately, I wound up following the directions that Apple showed in the videos on the Provisioning portal on the Developer site. Just a quick run-through summary here: First, I went through my "Keychain Access" app and deleted all my Certificates and Login Keys related to development. Second, I deleted all certificates, devices, and provisioning documents. (Note: Apple does not appear to let you delete any of your appID's in the Provision portal. From what I could discern, no one appears to know why that is. Way to go, Apple.) Ok. Starting from a clean slate, I followed the directions: -Certificate: (created CSR (Certificate Signing Request) via Keychain Access, and uploaded the document to the portal. Then downloaded the Apple-Generated Certificate. On the Certificates page of the portal, there is reference to a document called "AppleWWDRCA.cer", but it wasn't clear what should be done with that file. I am keeping a copy of it with my Cert. on my local drive, but a brief search on the net suggested that I drop that file in the Keychain Access app on the "System" item in the left column. I'm not sure if that really did anything. -Devices: This was fairly straight-ahead. I captured the UDID (User Device Identification?) for both my iPhone and iPad, and input them each with a label of my own creation. -AppID: A little less straight-ahead, but workable. This page on the portal has 2 fields asking for: - a description. I put in "testSample". -a Bundle Identifier. I put in "com.gadgetwerx.testSample". For the record, this worked better than what I had done last month when setting this stuff up. When you put in a proper reverse domain like this, apple enables: •in-app purchases •Game Center •Push Notifications (makes configurable) Last month these things were unavailable because I didn't adhere to how the field wanted me to put in a domain properly. -Provision: this portal page is also straightforward. Just fill in a profile name, check the cert box, choose which AppID, and which devices. The portal generates a file. Downloaded it, and drop it on Xcode, at which point I have the GREEN light that it's a valid profile. And the last bit is that I went into Xcode and opened my project.... clicked on the Target name, and in the Info tab window, I had to change the Bundle Identifier to: com.gadgetwerx.testSample (as noted above). So, tried my sample file again. The iphone/ipad simulators worked fine. The actual iphone worked fine. iPad didn't work. Xcode didn't even recognize that iPad was connected. So... get this.... In Xcode I had to go into the Organizer, and there was the iPad in the left column. You have to click on the device, and then in the main window you have to click on the button that says "Use for Development" (Really, Apple!?!?) Anyway... mission accomplished, and now my gear is now set up to test correctly. (I'm considering making a video to walk through this process a little more informally than the apple videos.)
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
09/29/12 06:31 AM (13 years ago)
Thank you for writing this up! Provisioning is so annoying.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
09/29/12 07:07 AM (13 years ago)
agreed. I made a bunch of fake profiles and app id's and certificates and just went thru the process step by step a few times to get it down. I thought Automatic Device Provisioning was the secret but it is tricky too. Here's a good read that really explains the how/why of the process well. http://www.raywenderlich.com/2915/ios-code-signing-under-the-hood there will be an "a ha" momment during the process where it makes sense. keep at it, you want to understand this process, it's critical. we love video tutorials too!
 
Arubaman
Aspiring developer
Profile
Posts: 636
Reg: Oct 20, 2011
Akron
16,910
like
09/29/12 11:39 AM (13 years ago)
http://btugwiki.com/index.php/Code_Signing_Basics This is also a good guide by @Stefan
 
RFConcierge
Lost but trying
Profile
Posts: 142
Reg: May 08, 2012
San Diego, ca
7,520
like
09/29/12 05:02 PM (13 years ago)
AussieRyan sent me this. Part 2 finally got me on my testing device and submitted. http://www.raywenderlich.com/8003/how-to-submit-your-app-to-apple-from-no-account-to-app-store-part-1 Ryan
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.