Apple programming begins with Xcode, an integrated development environment (IDE) that you can call up from the Developer directory. To write iPhone or iPad programs, you must have downloaded the iPhone SDK. After you've done that, choosing File > New Project gets you started. You're immediately asked to select a template for your new project.
The template you choose will fill your project with default frameworks, default files, default objects, and even default code. As you'll see, it'll be a great help in jumpstarting your own coding. For your first program, go with the simplest template you can find: Window-Based Application. After you select a template, you also need to name your project and choose where to save it; but when you've done that, you're ready to start coding.
When called up, Xcode displays one window. Xcode's main project window includes three parts. Off to the left is a side pane that contains a listing of all the files that are being used in your project, organized by type. Whenever you need to add frameworks, images, databases, or other files to your projects, you do so here.
The left pane also contains some other useful elements, in particular an Errors and Warnings item that you can click open to quickly see any problems in your compilation. The upper-right pane contains an ungrouped list of files used by your project. When you click one of those, its contents appear in the lower-right pane. Even the simplest program includes over a half-dozen files.
To compile in Xcode, choose Build > Build and Run from the menus. Your program compiles and links. Then, it's installed on the iPhone Simulator, and the iPhone Simulator starts it up. If you try this using the project you just created using the Window- Based Application template, you'll see the whole process, resulting in an empty white screen displaying on your iPhone Simulator. Note that programs exist only on your Simulator (or in the iPhone); they can't be run on your Macintosh directly.
If you want to later rerun a program that you've already compiled, you can do so in one of three ways. You can click the program's button, which should now appear in your Simulator. Or, you can choose Run > Run from within Xcode. Finally, you can choose Build and Go in Xcode, which builds only if required and then executes your program.
That's it! With a rudimentary understanding of Xcode now in hand, you're ready to write your first SDK program. You should begin every project by choosing File > New Project, choosing a template, and naming your file.
Our website is not responsible for the information contained by this article. Webworldarticles.com is a free articles resource thus practically any visitor can submit an article. However if you notice any copyrighted material, please contact us and we will remove the article(s) in discussion right away.
This article was sent to us by:
Christian Glousten at
09232010
1. Market segmentation is a necessity when selling an iPhone iPad app
All articles in this directory are property of their respective authors. Additionally, read our Privacy Policy
© 2010 WebWorldarticles.com - All Rights Reserved. Partners: Gunblade Saga