Xcode Apple programming introduction and tips


Xcode introduction

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.

Anatomy of Xcode

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.

Compiling and executing in Xcode

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.

Legal Disclaimer

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

Related Articles

1. Market segmentation is a necessity when selling an iPhone iPad app
Segmentation starts when you post your app on the App Store through the categorization required by the store. Some developers are not sure what category their app should be...

2. Building Your Apps Total Message
Building Your App’s Total Message Some people think marketing your iPhone/iPad app consists of doing a little advertising and a press release. Actually, mar...

3. An effective iPhone iPad app name can help increase your sales
Choose an Effective App Name An effective iPhone/iPad app name can help increase your sales because the buyer does not have to invest as much effort to understand...

4. Your App Store text to help you captivate your readers attention
App Store Text: Lighten It Up In this mobile economy, people are reading less when it comes to their communications. Attention spans are short and, with the crush...

5. Your product website for App Store product page
Build a Simple, Clean Product Website Your product website should be similar in look and feel to your App Store product page. A carryover between the two sites wi...

6. Strive for Immediate Positive Reviews for your Ipad app
Strive for Immediate Positive Reviews There is nothing like getting a good reference. Whether you realize it, we all tend to listen to what other people say about...

7. Gets a positive review by an iPhone iPad app review site
Positive External Reviews Sometimes a developer is lucky in that his or her app gets a positive review by an iPhone/iPad app review site. That review gets picked ...

8. Your iPhone and iPad App Marketing Strategy
Coordinated Marketing Effort The first step is to make sure that all your marketing content uses your newly created unique message, “Your iPhone and iPad Ap...