Building an iPhone app Part 2: PhoneGap Tips

I picked PhoneGap mostly because I wanted to learn more about modern HTML, CSS, & jQuery. I viewed the cross platform capabilities as a side-benifit. In fact I have’t released a version yet for the other app stores. So here are some tips I learned while developing GoodDay.

1. Make sure you set the target SDK properly in the Xcode project settings. You’ll need to make sure that the target SDK matches the one you have installed on your system. This seems obvious now, but I wasted an hour trying to figure out why my project would not compile.


2. Debugging in desktop Safari is MUCH faster and you get better tools to work with. I used this mostly in the beginning to develop the data layer and the rough UI functionality. Because of the timing and slight render differences between the mobile and desktop versions of Safari I’d recommend checking in on the emulator from time to time. Note that there is a PhoneGap simulator as well.

3. I hate to admit it, but alert style debugging worked best for me and I had a macro to comment and uncomment my alerts when running in the emulator.

4. Turn off stuff you don’t use. There are option for turning off the accelerator, location, and auto-phone number linking.  Maybe GoodDay is boring, but it doesn’t use these things and they only add constant polling that slows things down.


5. Read up on SQLite and nail the persistent storage. I wasn’t sure how well this would work, but it was great. I built a full data layer with unit tests with qUnit before I started the UI.  I’m barely scratching the surface with this app.

6. The best walkthrough I found is located here.

I’m sure there are a world of other tips out there, but I’m new here and this is some of the knowledge I picked up in my first project that you may find helpful.  In the next part I’ll talk about the usage of jQtouch in GoodDay.

Bonus Reader Tip: Another tip, you can use your preferred editor and just link the www folders. You don’t have to use xCode to code.

3 Responses to “Building an iPhone app Part 2: PhoneGap Tips”

  1. Preet says:


    I am building an ios iPhone app using PhoneGap. My app is quite heavy and takes around 15 secs to load, so i thought if i can add another splash image while loading an app. but not sure how to do that. I am eagerly looking for some solution. Could you please  provide any suggetion that how can I add 2/3 splash images by giving time duration. Thanks..

    • Anonymous says:

      I might recommend asking the experts at  

      But I’d recommend evaluating if you really need to load everything that you are loading on startup.  You can move scripts and data to separate pages that load when the user requests that data. 

      • Preet says:

         Hi Josh, Thank you so much for your suggestion, I will try that. In the mean time, if you can ask to community of PhoneGap that will be great. Thanks, look forward to hear from you soon..

Leave a Reply