Before we can discuss the ins-and-outs of developing for the iPhone, we first need to identify the tools you'll need to get your application written. Like any platform, there are some great (and not-so-great) tools at your disposal to get your application written, tested, and debugged. This article will identify some of my favorites, which should set you well on your way to developing for the iPhone.
0. An Apple Developer Account
Before you get started writing for your iPhone, you'll need an account on Apple's developer site. I often hear some confusion from people new to iPhone development who do not understand how the system works. An account on Apple's developer site is free. You can download the tools, write applications, and run them in the iPhone simulator at absolutely no cost. However, if you want to run your application on real hardware, you'll need to pay $99 for a program account. This gets you the ability to digitally sign your code for both development and, eventually, production. Once you've completed development and your code has been approved by Apple, you can start selling your creation on the App Store. As I'm sure you're aware, Apple takes 30% off the top, but if your app is worthwile, the remaining 70% will let you recoup the $99 developer cost in no time.
1. A Mac
Like it or not, the development tools for the iPhone require a Mac. Not just any Mac, mind you. You'll need to be running one of the (somewhat) newer Intel-based Macs. While this may be a pretty substantial barrier to entry for most folks, it is one you'll need to get past if you ever want to successfully develop for the iPhone. I own a 2.4GHz MacBook Pro that I use as my development machine. I maxed out the RAM to 4GB, which makes all the difference, particularly when you're running multiple tools at once. Most likely, you won't need to have a beast of a machine to get your application written. Most developers won't need an 8-core MacPro with 32GB of memory just to get their application up and running. An iMac, MacBook Pro, or even a MacBook should be more than adequate for your needs.
2. XCode Developer Tools
The only supported development environment for the iPhone is Apple's own XCode. Coming from the Java world, I've been spoiled with great development environments like Eclipse, Netbeans, and IntelliJ IDEA. XCode is not one of these environments. The interface seems a bit clunky, and it lacks a lot of the features I've gotten used to with Java development, such as refactoring. But, it does include the excellent Interface Builder for laying out user interfaces. While Netbean's Matisse still takes the cake in that department, Interface Builder is more than sufficient, and perfect for iPhone development.
XCode does include a number of built-in utilities for performance monitoring and finding memory leaks, so you will have a range of tools in your arsenal. In addition, you probably want to download some of the tutorials on Apple's developer site. These will give you a good starting point for developing your application.
The most useful piece of the XCode environment is the iPhone simulator. The simulator allows you to develop and test your application prior to spending $99 for a program membership. There are some issues with the simulator, and it's not 100% identical to running your application on real hardware. The one thing I know I failed to keep in mind was that my iPhone does not have a 2.4GHz processor and 4GB of RAM. I was unpleasantly surprised when my app repeatedly crashed and took 10 seconds between view changes. You'll definitely want to test your application on real hardware at some point, but developing for the simulator will get you headed in the right direction.
3. SQLite Manager for Firefox
Now that we've got the basic tools out of the way, we're ready to start examining some of the additional utilities you should use when writing your application. The first of these is the SQLite Manager plugin for Firefox. This browser plugin allows you to view and manipulate SQLite database files. The iPhone OS contains SQLite out-of-the-box, so it has become the de facto method for data storage. Using SQLite Manager, you can prepare your database for testing and deployment without having to resort to SQL creation scripts. This is a really useful tool in getting your application started.
4. SoapUI
Some of the most popular iPhone applications make use of web services to enhance their functionality. Many of these web services make use of SOAP, the Simple Object Access Protocol, for sending and receiving data. SoapUI is a graphical utility that allows you to test web service connectivity and prepare for SOAP development. Using SoapUI, you can prepare your request objects that are used to get information from the service, and inspect the response object you receive. SoapUI provides a great resource for beginning with web services development.
5. Subversion
Repeat after me..."Version control is your friend." Using version control allows you to track changes made to your source code, tag changes as a release, and revert back to previous versions if necessary. While there are a number of different utilities for version control -- PVCS, CVS, Git, etc. -- I make use of Subversion. It's easy to install and get started with. Plus, Google Code and Sourceforge also allow developers to use it for their project hosting. Regardless of which package you use, you definitely want to have a good revision control system in place before you start writing serious code.
6. LLVM/Clang Static Analyzer
As I mentioned before, your iPhone is not your MacBook Pro. It has a finite amount of memory, so you need to make sure you're using it responsibly. The primary language for iPhone development is Objective-C. This is not Java. You don't have the benefit of automatic garbage collection. As a result, you need to ensure you're allocating and deallocating memory properly. The LLVM/Clang Static Analyzer performs static analysis on your code to identify programming errors, hidden memory leaks, and naming schemas that violate the Objective-C naming convention. Static analysis is not foolproof. There are a lot of false positives to deal with, and understanding the output can be difficult. However, if you're developing a complex application, a static analysis tool will help you to ensure that you're squeezing every bit of performance out of it that you can.
This is just a short list of tools you can use to get started with iPhone application development. Later on, I'll examine some of the more useful libraries and frameworks that will help you get your application up and running in no time.
Monday, March 23, 2009
6 Tools for Beginning iPhone Development
Labels:
apple,
firefox,
iphone,
objectivec,
soapui,
sqlite,
subversion,
xcode
Subscribe to:
Post Comments (Atom)
Thanks for this post. I am a newbie at Iphone development and this will definitely help.
ReplyDeleteCan you recommend any good books?
@Govind:
ReplyDeleteOne of the books I've been using quite a bit is the iPhone Developer's Cookbook. It covers some advanced functionality, and assumes you're already familiar with Objective-C. But, it provides a great way to get up and running quickly.
http://www.amazon.com/iPhone-Developers-Cookbook-Building-Applications/dp/0321555457
Take note, however, that a lot of the examples make use of undocumented APIs. Using those in your application is a sure way to get it rejected by Apple.
Hi, im also new to iphone area, and im actually wondering if theres any good books on C++ that would help? Not trying to develop any advance apps, just want to make ebook apps.. where you convert and ebook to a readable app
ReplyDelete-Ray
wendes2000@gmail
I was totally lost, but thanks to your blog i found my way thanks a mil
ReplyDeleteMany thanks, this post has helped me a lot in my iPhone development journey. I also think sensible tableview from sensible cocoa (http://www.sensiblecocoa.com) is a must have. One of the most frustrating things to me as a newbie is working with tableviews, and I think the guys at sensible really nailed it.
ReplyDeleteThanks @WhoAmI? about to share this information about iPhone Developer's Cookbook. really your link must be helpful. iphone application development
ReplyDelete