IphoneDev101

Latest

  • iPhone Dev 101: The "Hello World!" app

    by 
    Cory Bohon
    Cory Bohon
    04.27.2009

    In the last iPhone Dev 101 post, I told you a little about creating your first project using Xcode; however, in this post, I want to show you how to create your first application that will run in the iPhone simulator. In honor of staying with the classic way of teaching programming, we'll create a "Hello World!" application as our first one. Creating the new projectIf you have installed the iPhone SDK/Xcode, then you can launch Xcode by navigating to /Developer/Applications. Once there, you can double click on the Xcode application (you may also find it handy to just drag the icon to the dock if you will be using it a lot). Once Xcode launches, click File > New Project. Under the iPhone OS section on the left side of the resulting window, select "Application." Select "View-based Application" from the templates that show up on the right side, and then click the "Choose" button. You will then be prompted to specify a project save name -- this will also be the name of your resulting application, so choose your project name wisely. You're project has now been created, and the Xcode window that is displayed will contain all of your code, resources, etc. There isn't much there now, but the application is fully functional at this point. You can click the "Build & Go" button in the toolbar, and the application will be compiled and launched in the iPhone Simulator. Again, this is a fully functional application, but it doesn't do anything useful at this point -- the usefulness of the app is up to your coding, but Apple supplies you with the base code and dependencies.

  • iPhone Dev 101: Creating Xcode projects, brief Xcode UI overview

    by 
    Cory Bohon
    Cory Bohon
    03.31.2009

    In our last iPhone Dev 101, a continuing series on iPhone development, we talked about resources that you can use while you are coding with Cocoa. In this dev post, I'm going to walk you through Xcode and creating your first project.First we need to open Xcode, so once you have the SDK installed, you'll need to open /Developer/Applications/ and look for Xcode.app. This is Apple's IDE (Integrated Development Environment) that allows you to code, debug, test, and build all of your iPhone and Mac applications. When you open this application, nothing specially really happens, although you might see the welcome center -- if you see this, you can choose to disable it at startup by using the check box at the bottom. To create a new project, select File > New Project. In the resulting window select iPhone OS Application > View-based Application, and click "Choose." You will then need to specify a save name and location for the resulting files that will combine to create your application. In the resulting Xcode window, you should note that most of the work is already done for you!At this point you have a fully functional application. Try it out: click the "build and go" button at the top of the window and wait while the app is compiled and opens in the iPhone Simulator. The app definitely doesn't do much, but still, it's a running application you made without writing any code. Continue reading to learn more about Xcode, and get a brief UI overview.

  • iPhone Dev 101: Downloading and Installing the iPhone SDK

    by 
    Cory Bohon
    Cory Bohon
    01.25.2009

    We're continuing our series of iPhone Dev 101 posts -- a TUAW feature devoted to beginning iPhone developers. I'm going to spend a little time talking about where to download and how to install the SDK. Let's first talk about what exactly an SDK is. A software development kit is a set of tools and APIs (application programming interface) that allows a programmer the ability to develop for a specific system. Therefore, the iPhone SDK gives you the ability to program for the iPhone. The SDK is just a waste of space on your hard drive unless you know the programming language associated with the iPhone. To program on the iPhone, you will need some Cocoa (Objective-C) knowledge. There are a ton of resources available online and in book form -- I'll cover these and more in the next post in the series. If you already know a programming language like C/C++/Java, then you should just need a refresher course on the classes, methods, and basic expressions.To download Apple's iPhone SDK, you'll need an Apple ID -- this is a free account that you can use to access multiple Apple services including iTunes, Apple Discussions, the online store, and the developer site. If you don't have an account, you can easily get one on the iPhone Dev Center. Continue reading to learn how to download and install the iPhone SDK.