More and more frequently I’m approached by folks who are interested in writing apps for the iPhone, and want to know how to get started. Usually these are not other programmers with a few years of experience with other platforms, but rather folks who think it would be neat to get into the whole iPhone app gig thingie.
I certainly understand why they are interested – with well over 100k apps in the app store, and predictions in the news about the insane amounts of money to be made by releasing the next iBodilyFunction, everyone seems interested in cranking out the next big app.
Well, I’ve written a few iPhone applications now – some have been very successful, others have not even bought me lunch. If you are still reading, you may want to get a refreshing beverage, cause I’m now going to get up on my stump and pontificate.
First off, developing a killer iPhone app is hard work. This is not really the sort of thing that someone with a bit of html or php knowledge cobbled together by maintaining their brother’s wedding video website will be able to tackle in a weekend. The set of tools provided by Apple are robust and powerful, but come with a steep learning curve that will require patience and dedication to wade through.
It’s handy to come to the table with some deep Object Oriented experience in the first place. A CS degree is even better.
Secondly, those of us developing apps are not particularly interested in developing yours for you. I’m happy to offer advice or propose a solution to an isolated technical question, but requests such as “hey, can you write me a demo application that has 3 buttons on the main screen with labels that change colors when you tap them and a timer that keeps track of which button you tapped last and a scoring system that gives you points if you tap the right color at the right time and … ” – my response will likely be: Erhm. No.
Actually, I can guarantee that is what my response will be, cause I keep actually responding that way to people making similar requests.
Now, I won’t just say “NO!” and slam the door in your face – I find myself constantly giving out the same few key points of advice. Quoting now from an email I sent to yet another hopeful iPhone App Store Superstar:
I could put together a little example project that shows this, but, honestly, to do so would deny you the chance to learn a few key concepts in depth. You could see my sample project that works, but have no understanding of *why* it does. Specifically, there are a few root principles that every iPhone or Objective-C developer should learn:
a) Interface builder can be your best friend or worst enemy. Spend some time on YouTube looking for tutorials to understand the relationship between the code you write in Xcode and the UI you build in InterfaceBuilder. Wiring the 2 together is subtle, but *very* easy to get wrong.
b) Objective-C is very dissimilar to php from your background. You need to spend some time really digesting the difference between a .h and .m file, how they work together, what parts of your classes go in which file, etc.
c) Delegates. Learn what they are, how they work, and why they are useful. You can do amazing things with delegates, and they are used very frequently all over the Objective-C APIs.
If I were to put together the sort of example you have requested, the concepts above would all be used – unless you understood them, the example would not make much sense to you – even though it did what you were after.
Additionally, I would suggest that you use IRC to chat in real-time with other Objective-C and iPhone developers. In particular, the #iphonedev channel on freenode.net is full of several hundred very helpful people who are able to answer quick questions and point you to better resources.
Finally, there are many, many tutorial sites out there that are full of video tutorials on all of the above. Some are better than others. I have used http://www.iphonedevcentral.com/ extensively.
I’m happy to answer quick questions via email or even IM if you like, but I’m more of a “teach a man to fish, he’ll feed himself for a lifetime” rather than “give a man a fish and he’ll eat for a day” kind of guy, so I may point you to places to learn what you need to know, rather than just provide your finished product.
Best of luck with your iPhone development endeavors – may The Steve smile down upon you and help you sell a gajillion iWhateverItIs.