Blog Post

Preparing to Write Your First iPhone App

Stay on Top of Enterprise Technology Trends

Get updates impacting your industry from our GigaOm Research Community
Join the Community!

You’ve seen the statistics and glowing success stories and you’re interested in writing your first iPhone (s aapl) app. Good for you! If you’ve never developed content for a mobile device, or if you’re new to software development, learning iPhone development can be a fun and rewarding experience. In future articles I’ll be providing you with tips and tricks for getting your first application up and running. However before we jump into the code, let’s take a step back to consider the building blocks of your first app.

Will it make sense to your audience?

As in all things related to software development, the goal of your app will be to provide a solution to a set of end users. In some cases your “solution” could be an answer to a specific problem, or it could allow people to discover something new about their environment. Perhaps the solution already exists on another platform (e.g. desktop, web) but doesn’t exist for the iPhone.

One thing you do know is that your audience is on the go. People who use mobile applications find value in quick interactions with limited user input. They don’t want to use your app to write a Word document. However, people will like your app if they can get the information they need by pressing a button or two. In the case of a mapping application or email, they may only launch the app (with no user input) to get the information they need.

Think “Pocket Computer” instead of Mobile Phone

As an experienced web developer, the first thing that comes to mind when I hear the term “mobile phone” is limited functionality on a screen that’s too small. All things being equal, this has been the typical experience of previous mobile platforms. With the iPhone, think of the device as a pocket computer. For example, many new iPhone users report decreased usage in both laptop and desktop computers. In addition, successful applications like Pandora that have typically struggled in a desktop setting now flourish as a pocket computer solution. When planning your application think about what is unique to the iPhone that can be utilized in your app. If you can figure this out you’ll have the next Bump or Urbanspoon.

Consider the differences between the iPhone and iPod touch

With your cool app idea and a good understanding of your audience, let’s consider the actual hardware and software. Depending on which frameworks (major components of the iPhone SDK) are used in your application, your app may not work on every iPhone device. For example, an application that makes use of the camera, compass or microphone will work on an iPhone but not an iPod touch. It’s OK to write an app that’s limited to iPhone 3G or iPhone 3GS — just be sure you account for it when you develop (and market) your app. This should also go without saying, but be certain to have a physical iPhone or iPod touch to test your code before submitting your app to the App Store.

Document your ideas

Before you commit any code to your new project, take some time to document your end-user experience. This doesn’t need to be a lengthy requirements document. It could be as simple as writing down some notes on paper or sketching some drawings. When I created Jingle! I sketched the design using a stencil kit provided by UI Stencils. Using actual paper and a stencil kit was especially cool as it was a fun way to piece together user interface elements. I also tracked my notes, marketing materials and communication using Evernote.

Design a great user experience

When you start looking at Apple documentation, one recurring theme you will see is reference to a document called the Human Interface Guidelines (HIG). Essentially this is the master document for how your iPhone application should look and behave. Most of us have heard the stories of how XYZ app was “rejected” by Apple because of an apparently random decision. If you want a head start on what Apple is looking for in an application, you will benefit greatly by starting with this document.

Another way to ensure a great experience is to look at other leading applications that may be in your category. Ask yourself why those applications are the leaders and what elements they used to create a great experience. Also check out the ideas of usability expert Jakob Nielsen.

Manage Memory and Battery Life

To ensure your project is successful also consider how your app will manage memory and battery life. As we will discover in the code, there is no garbage collection for iPhone so you as a developer will be in command of memory management. Also, certain iPhone functions will use more battery life than others. For example, applications that stream data from the Internet or make extensive use of the Core Location Framework (e.g. GPS) will drain battery life more quickly.

Data Management

Finally, one of the most complex items you will need to consider is data management. You have three options. If your app is a basic utility (e.g. temperature converter, calculator) you shouldn’t have to worry about storing data. If you plan to build an app that connects to an Internet-based service (e.g. how Tweetie works with Twitter), you’ll connect to these online resources through web services. Your third option will be to store user data on the device using the Core Data Framework.

If you are planning your first app, feel free to send in your questions, thoughts and ideas!

20 Responses to “Preparing to Write Your First iPhone App”

  1. For those of us who have an idea but not the programming skills to execute it, what do you think is essential for us to read up on/learn vs what we can hire/partner with a programmer to do?

    For example, I think that most of the language learning apps on the market are clearly done by programmers who lack a good grounding in how languages are learned, so both would benefit if a team were made up of an experienced language teacher/designer and a programmer.

    For those of us who are not programmers however I think it would be useful for us to have an appreciation as much as possible about what is feasible and how difficult it is to implement something even if we can’t code it ourselves. This would enable us to provide programmers with more realistic instructions.

    What tips would you have for those of us who want to understand how apps are made but don’t have the time/ inclination to learn C and all the intricacies of the Apple developer requirements.

    (In addition to basic concepts such as classes, methods, properties, variables and inheritance.)

  2. @ Wayne: A couple of questions. Is it possible to have multiple functions for one app? And how would i go about combining two apps into one? Is it even possible? Thanks in advance!

  3. gmazin

    Don’t forget, you have the world of Webkit and Hackintoshes to help you get in for cheap and break even really quick. That’s what I did (though I’m still using this Hackintosh since it’s as good as any “real” Mac that I’ve used)

  4. Having very little programming experience I find myself with an
    abundance of knowledge to take in ie learning the languages,
    designing graphics etc.

    I find it prohibitive that I have to use a Mac to write and compile
    my code. At £800 to purchase new that is one overhead I wish
    to minimise. After doing some research I have seen some intel
    mac minis which I hope will be my starting block.

    I hope to see more articles soon as I need all the help I can get.


  5. LaptopHeaven

    I am working on the planning stage for an app. What’s the suggested format for using web-services? JSON, XML, etc?

    • You should be prepared to manage data retrieval using both JSON and XML. Some data providers will give you a choice as to the format, others will go with a single format. For my iPhone app I parse both formats.

      At the time of this writing there is no native SDK support for JSON but you can easily get around this by finding third party classes and incorporating them in your project.

      When making HTTP data requests the “suggested” method is to make your calls using the asynchronous format of NSURLConnection. (If others are interested in seeing how this works I may write an article on this subject). For now here’s a link to the documentation.

  6. Jet rodriguez

    Hey wayne I’m with Paul down there. I love my iPad and iPhone, have zero programming know how but have great ideas for unique apps that I feel consumers would love. I’ve seen some videos for the stanford app how to classes but they needed pre-requisites. I’ll look into your apple link but that seems to be more for developers and not starters.

    Great post and looking forward to future postings

  7. @Wayne

    For someone who has never written a line of code, in any language, how long would you say it would take to write a very simple utility? I know, people pick things up at different speeds, but at a guess..

    • I suppose you’ve hit on the most important factor which is previous development experience. As Sam has outlined in his previous comment there are a lot of areas to understand when pulling an app together.

      If you’ve never written code you will need to take a big step back. Spend time (a few weeks / months) digesting basic OO concepts such as classes, methods, properties, variables and inheritance. Start building small console apps using C, Java or C# for practice. Taking this extra step will make translating your skills to Objective-C a lot easier.

  8. Absolutely! There is a lot to inhale when getting up to speed with Apple development. I often get asked about the best online resources for learning the language and the development tools. In my next article I’ll start to tackle these categories and will provide links to suggested resources.

  9. Idea and screen designs are the most important, but there’s a lot to read up on. Let’s not forget about C, Objective C, cocoa, x-code, interface builder, developer licensing, needing a mac, hardware needed for testing, and sprinkle that with graphics development with photoshop. Game development adds a good 5-6 books on Open GL, Blender, etc…