A Webdeveloper and iPhone app development

So finally, after almost a year since I registered as an iPhone developer over at Apple, I build myself a couple of iPhone apps. Here’s how.

I have a couple of Objective C books laying around, which I opened once in a while, but closing them again pretty quickly… so I never got around developing anything. For now, I couldn’t justify any time spend on learning yet again another language. It is after all just a hobby project (the iPhone development that is). As a webdeveloper I could develop cool iPhone web apps (with jQTouch), but still that wouldn’t give me the same satisfaction as a native app. Then there are a couple of frameworks like PhoneGap and NimbleKit which allow you to develop iPhone apps with HTML, CSS and JavaScript. But you’re still confronted with XCode, working in a new environment.

Then I found Appcelerator and their Titanium Mobile. Their Titanium product allows for cross platform development for desktop apps, and their Titanium Mobile allows for, well, cross platform mobile applications, using JavaScript and HTML. And Titanium Mobile is itself written in Titanium. Still in beta, I thought I’d give it a try. Was I in for a surprise! Titanium Mobile creates native iPhone and Android apps, which means you get to use native UI elements, the GPS, the accelerator,… to get some apps up and running pretty quickly. For example, I took the http://nextsydneyferry.com code and converted into a simple iPhone app (in the simulator) in less than 30 minutes! Before I was able to get it onto my iPhone though, I had to set up “provisioning”, generating certificates and all. Something you need to do for XCode development too. Once that was set up, you click a button and it gets transferred through iTunes to your iPhone, and you got yourself a native app. Without opening XCode, in my preferred webdevelopment environment!

Some gotchas:

  • If you want to develop iPhone apps, you still need the iPhone SDK which is Mac only. No way around that. But you already have a Mac, right?
  • You’re building native apps, and there’s different support between iPhone and Android. For one some features are missing in the other. So you’ll need to cater for that, and fork code between iPhone and Android.
  • You still need to follow Apple’s design guidelines (although I’ve seen some horrible apps out there that don’t follow any design guideline). You’re not building an iPhone app for Android, or an Android app on iPhone.
  • Don’t expect to go building 30fps 3D apps or something, you’re better of doing that in Objective C

 

Having said that, for simple text-based, web-connected applications, Titanium Mobile is perfect:

  • There’s the basic API documentation of the JavaScript framework.
  • They have a Kitchen Sink app and source that shows you all there is available in the framework, so it’s just a matter of copy/pasting.
  • There’s a great forum for support and discussions.
  • There are a couple of screencasts to get you started.
  • Both iPhone and Android apps (and soon Blackberry) with a little bit of effort. I hope they would also add Palm’s WebOS.
  • It’s Open Source (on GitHub).

 

Oh right, something about the iPhone apps I developed… A NextSydneyFerry app, which is just a port of the web application into Titanium Mobile. I might add some more features like saving the data locally, so you don’t need a web connection (only for updates). And a Twitter visualization tool called TweetFrame, which cycles through tweets based on a search query you define, like “a digital picture frame, but for tweets”. The funny thing is that, through Facebook I got a request to have something like TweetFrame, but as a website widget (don’t know why, but there were already widgets like that). Well, since it’s just some JavaScript, I did the reverse and created a widget based off of the iPhone app… You can see it in action on the homepage, below the Flickr feed.

For now I mainly focused on iPhone. I don’t care that much for Android at the moment, though with a little extra effort I could get them to work on Android too. One of the other platforms Appcelerator is looking at is Blackberry (though could )

It’s golden times for web developers, a Renaissance, where HTML(5) and JavaScript open great possibilities. I think we’re only seeing the tip of the iceberg, there’s so much happening now, it’s an exciting time.

So, if you’ve been keeping off developing for iPhone, try out Titanium Mobile!

1 Comment

Add Yours

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.