These instructions follow the Getting Started with iOS guide at http://docs.phonegap.com/en/2.1.0/guide_getting-started_ios_index.md.html#Getting%20Started%20with%20iOS. (Earlier versions of this PG pointed to the wrong file.) PhoneGap uses “PhoneGap” and “Apache Cordova” terminology on its web site. I’m going to use “PG” often in this article for shorthand.
Before you can install the app on your device, you need to sign up as a Developer with Apple and go through the business documentation, Certificate Signing, and Developer Certificate process, all of which are detailed on Apple’s web site (https://developer.apple.com/programs/ios/), under Prepare for App Submission. Nevertheless, you can skip all those steps and still see your work in the the iOS Simulator included with Xcode. Xcode is a free download you can download now, but the Developer status comes at $99 a year. If you are new to creating apps for the App Store, you’ll want to peruse the App Store Review Guidelines to make sure your app falls within acceptable limits: https://developer.apple.com/appstore/resources/approval/guidelines.html
Currently, Weinre, developed by Patrick Mueller, only works in Webkit-based browsers like Google and Safari, as used in iPhone and Android devices. Here are the steps to download and install the software tool, and get it running on an iPod touch device running an app which uses Cordova PhoneGap. These steps are extremely thorough, designed for newbies to coding. (You’re welcome.)
(Sept. 21, 2012 update: If you use a Mac, you may want to try the iWebInspector, which is more feature-rich and designed to replace Weinre on the Mac.) Continue reading
According to the Developer Guide PDF dated 2012-06-13, after the status of our application is “Waiting for Upload,” we are to use Application Loader to upload our binary. However, the Product > Archive and submit process through Organizer still works. This process through Archive is way easier and faster than the App Loader process. But here is the App Loader procedures to follow if you want to take those steps.
Here are the Application Loader instructions online: https://itunesconnect.apple.com/docs/UsingApplicationLoader.pdf
“Waiting for Upload” status
Make sure in your Developer account online that the status of your app is “Waiting for Upload.” This means that you’ve filled in all required fields, including text and images. Continue reading
What steps do you follow to get your app out to a tester’s physical iOS device? This article assumes you will have the physical device in hand to plug into your development Mac computer. Continue reading
I got the above error and after a search, found this link that saved the day:
The steps I took to resolve this were:
1. In Finder, right-click on the xcodeproj file.
2. In the options box, click on Show Package Contents.
3. Right-click on the .pbxproj file and select to open in TextEdit.
4. Do a search on that file for the long string of numbers.
5. Comment out the line and save (add /* before the line and */ after the line).
6. Restart Xcode, reopen the xcodeproj file, and do a Product > Clean. It should start up fine if there were no other problems.
Xcode 4 Transition Guide
Link: [Sign in to your iOS Developer account] > iOS Dev Center > iOS Developer Library > Resource Types > Guides
These are notes based on the Xcode 4 Transition Guide (page numbers refer to the PDF) that I found helpful to me. This guide gives you an overview of the many refinements made during the transition from Xcode 3 to 4. Well worth a look if you are not using Xcode 4 regularly and would like to know more about its features. The following notes are of particular interest to me; you’ll find much more in the document than what I’ve written.
I just created an app with Xcode 4, PhoneGap 1.0, ChildBrowser, and local storage. That project is a template, the basis for starting any other projects I do in the future. Luckily for me, Apple has already created step-by-step instructions on how to rename an app (in this case, my template app) so that I can save the original as a template and use the renamed version as the app to submit. Read the above to see how we’re supposed to rename apps in this way, for Xcode 3 and 4.
Apple must have written a gazillion tech notes on a variety of issues people have with their products. Here’s one I wished I had known about sooner to help me with my code signing blues. It has a sexy name, too: TN2250.
Check it out next time an error mentions anything about code signing.
You’ll need the ChildBrowser plugin with PhoneGap in order to return to the app after clicking on an external link. A Done button will appear under the web page, allowing you to exit the web page and return to the app. Very convenient. I’ve had to search and experiment for two weeks before I could piece all the correct steps together. If you landed here early, you can do it all within an hour!
UPDATE 6/5/2012: For PhoneGap-Cordova 1.7.0, use these steps to install ChildBrowser:
UPDATE 3/21/2012: For PhoneGap-Cordova 1.5, use these steps to install ChildBrowser: http://blog.digitalbackcountry.com/2012/03/installing-the-childbrowser-plugin-for-ios-with-phonegapcordova-1-5/
The Windows PC is my main computer, so I’ll assume you are barely familiar with the Mac interface (maybe you’re moving from the PC to the Mac just for building apps, like me). So I think you’ll find these steps easy to follow. At this time, there are no screen shots (sorry). I assume you already have Xcode 4 installed. I’m not going to go into provisional profiles here; I’m going to assume you will take care of that on your own.
If you ever get the above message when you upload the binary to iTunes Connect, you may need to double-check the following points. I found the following helpful list when scanning the Apple support forum. Continue reading
The following comes from the iPhone Human Interface Guidelines, under Table Views, Text Views, and Web Views > Table-View Elements.
Use the Disclosure Indicator button, which contains a gray chevron at a cell’s right, when tapping the button will bring up a list of more choices.
Use the Detail Disclosure button, which contains a round blue button at a cell’s right, when tapping the button will bring up detailed information about the list item. As a mnemonic help, just think of “Detail” when you are revealing the actual details of the choice and not more choices.
UITableViewCellAccessoryDisclosureIndicator; // Adds “>” to right of cell.
UITableViewCellAccessoryDetailDisclosureButton; // Adds round blue button to right of cell.
After you slide the Slider control and label onto the page, how do you get them to work together? Here is the code I use to make a UISlider change the text of a UILabel. (Xcode 3) Continue reading
After you slide the segmented control and label onto the page, how do you get them to work together? Here is the code I use to make a three-button UISegmentedControl change the text of a UILabel. (Xcode 3) Continue reading
I put this page at the top of the site for quicker access. View it here.
When I have a new Xcode project and need to test on my device, these are the steps I take to get a provisioning profile working right the first time. (Vcode 3) Continue reading