I Built an iPhone App

Earlier this month I submitted my first iPhone app to the app store. You can check it out here. The Android version is forthcoming. I built it with AngularJS and Cordova and overall it was a great experience. Being able to use HTML, CSS, and Javascript, languages I already know, made the development very straightforward.

The reason for using Cordova and not building a native app was two fold. First, the app needed to be cross platform (iOS and Android) so without Cordova two code bases would be needed.

Second, the app needed to be delivered relatively soon. Understandably the company couldn’t wait the lengthy amount of time it would have taken for me to learn iOS and Android development then actually build the app. In this case, Cordova (or Phonegap if you like) made perfect sense.

But not everything was smooth sailing.

It’s The Little Things That Kill You

By far the most challenging part of building mobile apps with Cordova is making the app actually feel like an app. Both iOS and Android apps have tons a visual cues and certain behaviors and users expect. Because you generally don’t have access to the native UI components while using Cordova, it can be a real challenge to get the app to feel right. Inevitably you’ll spend most of your time debugging and fine tuning the small details of the app.

Going Down the Cordova Road

Anyone planning on using Cordova should do lots of research because there are many tips and tricks you can find that you need to know about in order to get your app to feel right. From eliminating the 300ms click delay to using -webkit-overflow-scrolling: touch, these tips and tricks are important to be aware of.

Also make sure you test of devices early. Very early. Like the first week you start coding. You’ll discover annoying issues like performance problems and font issues that you won’t see in the emulator. I didn’t test on a physical device until I was getting close to finishing and had a brief moment of panic when I found many issues that didn’t happen on the emulator.

Lastly, when testing on Android, use the Genymotion emulator and not the one that Google provides. I just learned about Genymotion in last couple days but I wish I had known about it much much earlier. It would have saved me tons of time. The problem is that the emulator that Google provides is slow. Super super slow. Even after installing HAXM and enabling the “Use Host GPU” option, the Android emulator is just too slow. You can’t get a feel for how your app actually works and the iterative software development cycle is slowed way down. This article explains how to setup and use Genymotion. Use it. It’ll make your life easier.

Beyond these couple things, there are many other “gotchas” and tips and tricks but as you do research you’ll find them mostly well documented. Cordova is really a great development experience if you use it correctly.

Now go forth and build!