Well, I was finally successful at getting an app I developed on my iPhone! This is done via the Developer program not the App store as you’ll want to test your app out on actual phones before you submit it to the store for approval.
I’ve had all sorts of problems as the original app could not be deployed to my phone because it had iOS version 5.x on it and the app was built with xCode 3.2 for Snow Leopard. Luckily they have v4.2 for Snow Leopard (I originally thought I’d have to upgrade my OS to Lion, which I might do at some point anyway).
So after I installed xCode v4.2 I had start errors. I then uninstalled xCode and reinstalled, then rebooted. I still got errors on boot up and the confusing thing for me is that there are multiple xCode icons in my Finder so when you right click on one it will say what version it is. The one that was giving errors was v3.2.6 to I moved that to trash.
Then I tried copying previous projects into xCode and it would build okay but wouldn’t go on the phone. I wasn’t sure with the reinstall if I lost some things but I rebooted and restarted xCode a few times as suggested during Google searches but that didn’t help. So I created a new project from scratch and copied the files over (from PhoneGap) and presto it went onto the phone!
With all the Developer provisioning profile stuff you have to do on Apple, at the end of the day you get a bundle identifier that you need to use in your app plist file.
When you drag the www folder from another project over you have to make sure it highlights your project and keeps the references. I find using a previous project directory is ripe for problems so try to start everything fresh. A huge pain but it’s great to now have an app on the phone to test. And with phonegap you can copy over different apps and test them in the same project if you want to avoid creating new provisioning profiles. I haven’t fully mastered this area yet but I have it working so I’m super pumped.