For many months now, I’ve been working with the guys at Mediumrare on an iPhone app to help look up upcoming bus and train times. It’s been a long journey and we left Calgarians a little taste of what’s to come on our company blog, as well as a little demo at DemoCamp. However, last week we finally wrapped things up and submitted version 1.0 to Apple. While the app is waiting to be reviewed for approval, I thought I could give a peek into what it was like to develop my first iPhone app.
A Functional Prototype Goes A Long Way
This summer, I decided to try my hand at iPhone app development. An opportunity arose when we were playing around with the idea to make a more friendlier website to look up bus times. Although creating a website could have been translated into a mobile version, I thought it would be fun to experiment and see if I could come up with a native iPhone app.
a couple many hours delving into Objective-C. I had some basic experience working with C++ in a 1st year computer science course at the U of C, but coming from that and mostly working with Java in other courses, I have to say that the syntax initially comes off as quirky. Eventually though, it was just another language that you get used to (although it helps if you have a background in working with C++).
After a little over a month, I had a functioning prototype. Although it had some rough spots, the prototype did what it was supposed to do by essentially doing the equivalent of filling out the Next Bus/CTrain form on the front page of the Calgary Transit website, grabbing the responding web page’s HTML, parsing it to grab the needed data and displaying it to you.
After getting in touch with the right people, I was able to demo the prototype to some employees of Calgary Transit and the City of Calgary. At the time, a public feed of Calgary Transit’s bus times data was not available and the methods in which I got the data for the prototype went against the terms of service on Calgary Transit’s website. Thankfully after meeting with them and waiting it out, Calgary Transit finally exported their data in the Google Transit Feed Specification which we were able to use legitimately in an iPhone application.
Although we could have easily just changed the methods in the application on how it grabbed the data to the new stuff, Leigh and Bryan proposed some fantastic redesigns which made the app look much more polished.
I too decided to re-do things by rewriting the entire application. The prototype was mostly mashed up pieces of sample code I found from Apple’s developer resources and other various iPhone tutorial sites. I started with a new direction, leveraging the Three20 framework — the same framework which powers Facebook’s iPhone app.
By basing the app on the Three20 framework, I was able to utilize some neat features such as:
- An inline browser (so that clicking on a link in the twitter feed wouldn’t kick you out of the app)
- URL based navigation (this feature made transitioning between controllers feel more like a webapp — even allowing you to pass parameters in the URL)
- A global stylesheet (you’re able to define styles such as colours and fonts in one file, much like the way CSS works)
- A JSON library (parsing JSON for the twitter feed and bus times was made easier because of this)
As of this post, the app has already been submitted and is going through Apple’s app review process. In the version which we submitted, you will be able to:
- Look up upcoming bus/train times using the 4-digit stop number
- See the last 5 recent tweets from Calgary Transit’s twitter account (makes it easy to see delays, especially in the recent snowy weather we’ve gotten these past two days)
- Add a stop to your favourites
- Rename a favourited stop
- Reorder your list of favourite stops
Based on other developer’s experiences, our app should be hitting the app store in about a week now. If you’d like to be notified via email as soon as it shows up, sign up on our mailing list at http://calgarytransitschedule.com.