Archive for the ‘Developing for the iPhone’ Category

Developing for the iPhone Part 4: The Notebook

Monday, August 25th, 2008

I’m working furiously to get a few of the most requested features in (dice locking, colored dice, history, etc.). A word of advice: if you ever plan to have multiple views flipping back and forth with a navigation bar, code that up before you start working on your main view, especially if you want to do something tricky like have a view to the left of your main view… Ah, hindsight.

Anyways, I thought I’d take a bit of a break from that and go into one of the most important pieces of equipment when it comes to developing software: the notebook. That’s right, this humble notebook is vital to your project because it represents planning. Without the notebook, you might just start adding features and UI elements willy-nilly and then where would you be? Stuck with a crappy product, that’s where! You could use anything to plan, really; loose sheets of paper, napkins, a blackboard. But I prefer a notebook for a few reasons:

  • it’s portable so you can jot down ideas wherever they occur to you
  • the pages are connected so they won’t get lost or mixed up
  • it makes you look cool

Well, okay, maybe it won’t make you look cool. But hey, the director of Pan’s Labyrinth, Guillermo del Toro, has one and he’s pretty darn cool.

Developing for the iPhone Part 3: Software

Saturday, August 9th, 2008

When it comes to software, there’s really one thing you need: the official iPhone software development kit. I can’t go into much detail about the SDK because they require confidentiality when you sign up for it, but I can tell you it’s good. It contains Xcode (Apple’s software developing environment), Interface Builder (to create user interfaces), the iPhone Simulator (which does just about everything the real one does except take pictures, use the accelerometer, and make calls), lots of documentation, and lots of sample code.

To get the SDK, you just need to have an account with Apple (like iTunes) and you have to agree to their terms and conditions. Mostly, it’s stuff like confidentiality and that you agree not to write abusive software. They says it’s $99 (for the Standard Program) and $299 (for the Enterprise Program if you want to write programs that are only for your company). But you don’t have to pay until you are accepted to the program (which may take several months) and even then, you can change your mind and choose not to enroll. In the meantime, you can download the SDK for free and try it out.

The only thing the SDK doesn’t come with is media creation stuff, like graphics and sound creations tools. For graphics, the standard is Photoshop but if you’re just starting out and you’re on a budget like me, you might want to take a look at the Gnu Image Manipulation Program (gimp) which is free. That’s what I used to create all the graphics on this site and in my dice rolling app. Sure, they’re not the greatest graphics in the world but to be honest, the limiting factor isn’t the software, it’s me. Da Vinci could do more with charcoal than most people can with a full set of oil paints. Don’t let lack of graphics software be a hurdle. Just get out there and do what you can with what you’ve got.

Developing for the iPhone Part 2: Hardware

Friday, August 8th, 2008

The first consideration when developing an iPhone app is the hardware. And it basically boils down to two devices:

  • a Mac
  • an iPhone (or iPod touch)

As I mentioned before, I had never owned a Mac and I didn’t own an iPhone when I first became interested in writing an app for it so this was a bit of an expensive proposition. My advice? Try hitting up your friends who have more disposable income than you do. I’m married (no kids but single income), living in the Bay Area, and paying off a mortgage so my disposable income is close to zero. Oh yeah, good times… But fortunately, I’m in a techy kind of industry and I know lots of people who love their gadgets. Some of them even have spare laptops and phones.

About the computer: be sure you get an Intel Mac. Yes, it’s theoretically possible to get the SDK running on a PowerPC Mac but I tried it and I wouldn’t advise it unless you just want to see what the SDK looks like. I was able to get the SDK to compile my applications on a PPC Mac but after beta 5 or so, my apps stopped running on the simulator. Maybe I didn’t set all the configurations right, maybe my machine was a bit flakey, or maybe it was the OpenGL stuff I was doing. But trust me, there are enough challenges to programming for the iPhone that you really don’t need to add this one.

About the iPhone (or iPod Touch): you actually don’t need one, at least for a while. Yes, you’ll need it to test out things with the accelerometer, camera, etc. But otherwise, the simulator is very good. If you don’t have an iPhone but you’ve already got the Intel Mac, I suggest downloading the SDK and just trying it out. The simulator is good enough to give you a sense of what your final app will be like.

In the next post, I’ll talk about software issues.

Developing for the iPhone Part 1: Background

Thursday, August 7th, 2008

So, you’re thinking about developing for the iPhone. Great! It’s lots of fun and very rewarding to see your own little program running on an iPhone. There are plenty of tutorials out there but I thought it might be useful to talk about my own experiences.

I have a fairly technical background, mostly in computer graphics. I’ve programmed in C++, used Open GL, and even wrote a couple apps for my Palm OS device back in the day. When I started this project, however, I had never owned a Mac, programmed in Objective C, or even owned an iPhone. But I managed to get a simple version of my dice rolling app up and running after several weekends.

I’ll go into various aspects of my experiences, starting with hardware concerns in the next post.