Saturday, October 25, 2008

Success with iPhone Provisioning Profiles

I spent all day (literally, all day) trying to setup my iPhone app such that it would run on my physical iPhone. For those of you who have problems, some of this may help you.

My application has always run OK in the simulator. Since I've had the phone for a few months now, and I'm recently a certified Apple iPhone Developer (paid the $99 too) I thought it was about time to get my app on my iPhone.
I just didn't think it'd take me an entire day. And by entire - it was actually more then a day; I had setup my 'Team' and done the root CSR request about a week earlier. Over the span of the week, I had skimmed the documentation. And I had scheduled today, the entire day for iPhone stuff. Meaning code, and putting the app on the phone.

I started this morning. Followed the doc's in the how-to tabs. And had absolutely no luck. From the dreaded (0xE800003A) error, to (0xE8000001), "handle_install: Installation failed", (0xE800003A) Verifying Application, etc etc. "

Late this afternoon I gave up; I shut everything down, rebooted, deleted /Developer, rebooted, then downloaded Xcode 3.1.1 and the 2.1 iPhone SDK. And proceeded to start over.

After all the installations, then I went into Xcode "documentation" and let it "download" . Then I devised a strategy - I had been doing bits and pieces of trying different things all da long -- things people suggested in Apple's Developer Forums and many other "non-official" sites (easily findable via the Google). I decided I would start completely over with my developer setting as well. Here's what I did:



  • Deleted Xcode and iPhone SDK (mentioned above) and reinstalled. I don't think you must reboot, but after an XCode installation your boot cache's will be updated so I think it's a good idea to do the reboot.

  • I deleted ~/Library/MobileDevice/Provisioning Profiles/*.

  • I went into the iPhone Developer Program and revoked my certificate and re-did it, as well as deleting all of my provisions.

  • Then I created a new app ID. I called it "My Application Suite App ID" . I gave it a wildcard. Why? Well, the more I'd read, the more I decided this was the correct way to do this. It would let me put any iPhone app that I compiled on my iPHone. Oh, and don't use the "App ID Name" of "test". I spent the afternoon getting frustrated trying to get all this to work. The system does not seem to like things named with 'test'. YMMV.

  • Once the Privisioning is approved and you can download it, drag and drop the file onto XCode. That installs it.
  • Now, take the iPhone, goto settings:general::profile and delete any out of it. reboot the phone. launch xcode, then plug the phone in. switch xcode and goto the organizer (cmd-control-o) and make sure your provision is added (checked) to the iphone device. One the phone it'll look like this:

  • Now we create a simple Xcode app to see if it'll even run on the phone., In Xcode, cmd-shift-n for a new project. It will be of type iPhone Navigation-Based-Applicaiton. (The following is in the iPhone Develper Docs, but I'll quickly summerize for the sake it): Call it 'Foo' or whatever. Expand the Targets folder in "Groups & Files". Click on 'Foo' within the Targets folder. Click the "info" blue-circle icon in the top bar of the window. Switch to 'Build' Tab. There's section called "code signing". You want to change the "iPhone Developer" to "iPhone Developer: Firstname Lastname" and they "any iPhone OS Device" to the name of your provision, namely in my case "My Development Provisioning Profile". Close the window.

  • Then test it all cmd-r. In a minute or so the app should be running on your phone. Not that it'll do much, but that's left for you to hack at :)

  • There were a few sites I found helpful in figuring all this out: preflightingapplication errors (0xe8000001), mac rumors forums, Debugging iPhone provision profiles/certificats and Apple's discussion forums.


    >>Keep Reading: Full Post and Comments

    Friday, October 10, 2008

    Apple iPhone Developer Tech Talks

    Apple Launches iPhone Developer Tech Talks.

    I suppose that explains why Apple held that NDA out so long. By doing so, no one could have possibly usurped Apple with their down Developer Conference/Talks. >>Keep Reading: Full Post and Comments

    Monday, October 06, 2008

    5x5 week 3 review


    I'm a little late posting my week #3 results. However, I made it to the gym everyday and added cardio...

    I added 10 minutes of cardio on an eliptical machine after the workout. I did it twice. On Friday, I ran out of juice and skipped it. But to make up, over the weekend I went and did about 45 minutes worth of cardio.

    Is it working? I think so. I'm feeling stronger. My shorts are now nearly falling off me (I'm going to have to buy some belts). I'm not going to bother posting the weights, since I'm on track (or better). The 5x5 suggests only measuring your fat/weight every 2 weeks. Given that, and the fact that I forgot to do that this past weekend, I'm got nothing to report on that front either.

    I intend to do that this Saturday morning, however. I will post the information hopefully Saturday morning.
    >>Keep Reading: Full Post and Comments