How to Build and use an Xcode Development Environment instance in Objective-C

Source: Internet
Author: User

Objective-CHow to Build and useXcodeThe Development Environment instance tutorial is the content to be introduced in this article. It mainly introduces how to set up and use Apple'sXcodeLet's look at the development environment.

Apple developers

Today, we start our journey to Cocoa programming with Objective-C 2.0 programming as the foundation!

Since Chapter 1 is an introduction, both the body and code start with chapter 2 Objective-C program design.

First, Mike explained why he chose this book as the Sample. After comparing several related books, I found that only the books that do not require the basics of any language earlier must have at least the basics of C language ). That is to say, it is okay to start from scratch. Of course, if you can have basic learning of advanced languages, it will certainly be easier to get twice the result with half the effort. Stephen, the author of this book, uses an unconventional method to explain Objective-C and the basic C language as an integrated language from the perspective of object-oriented programming.

Secondly, it will be a very good Objective-C tool book. After studying this book systematically, you can read it from time to time. The examples in the book are very incisive and unique.

Okay, I will not talk about it anymore. How to Build and use Apple's Xcode development environment?

Step 1: Find a Mac computer and a laptop desktop. Don't talk to me about installing a black apple. Your wasted time and energy will definitely lose more. I came here. Do not ask if it is convenient to use GNUstep encoding on Windows? I used it as early as possible. There is no problem in compiling simple Objective-C code above. The more tired you are, the more tired you are! A lot of Code cannot be fully run on it. So I am not going to post it as a tutorial. Give up all evil ideas! Let's worship the old Joe's kingdom. You will be honored!

Step 2: Download Xcode from the network. As a registered developer, the latest version downloaded from the apple Developer Center is Xcode 4. Considering that the book was published earlier, I installed the early version 3.1.4 on the local machine to simulate the development environment at that time. Today, Google didn't start to play traversing search. Well, I am also busy. Let's get through development. Xcode3.1 installation package, You can Google it on the Internet.

Step 2: Install. Install the package Step by Step. No difficulty.

Step 3: Find a subfolder named Application in the Developer folder. Start Xcode.

Step 4: Under the File menu. Select New Project. A dialog box is displayed.

Step 5: Scroll down in the left pane until you find the Command Line Utility.

Step 6: Find the Foundation Tool in the right pane. Then, click Choose to open a new window.

Step 7: name the new program and Save it.

Step 8: OK. Congratulations, a development project window has been created. The encoding of the initial example is in that. m file.

Step 9: write the code. The screen displays different colors based on the text. Don't worry, Xcode uses different color indicators, reserved words and other content.

The tenth step has been written. What should I do? Save the file and compile it. In Xcode, Build and Run are constructed and Run ). Why not use Build? Because the program will not run automatically after the build. Let me tell you the difference between Build and Go and Build and Run. Build and Go means to Build and execute the last completed operation. This may be Run, Debug, Run with Shark or Instruments. When you execute it for the first time, it is built and Run by default, that is, Build and Run, so there is no problem with the operation at this time.

Summary:Objective-CHow to Build and useXcodeThe Development Environment instance tutorial is complete. I hope this article will help you!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.