How to Install Objective-C in Mac OS?

Compiling and Running Objective-C Programs:

Before we go into a detailed explanation of this program, we need to cover the steps involved in compiling and running it. You can compile and run your program using Xcode or use the Clang Objective-C compiler in a Terminal window.

Install Objective-C Using Xcode:

Xcode is a sophisticated application that enables you to easily type in, compile, debug, and execute programs. If you plan on doing serious application development on the Mac, learning how to use this powerful tool is worthwhile. We just get you started here. Later we return to Xcode and take you through the steps involved in developing a graphical application with it.

1. Start Xcode, then select Create a New Xcode Project from the startup screen or under the File menu,
select New -> Project.

2. In the left pane, you’ll see a section labelled OS X. Select Application, In the upper-right pane,
select Command Line Tool.

3. On the next pane that appears, you pick your application’s name. Enter prog1 for the product name and type in something in the Company Identifier and Bundle Identifier fields. The latter field is used for creating iOS apps, so we don’t need to be too concerned at this point about what’s entered there. Make sure Foundation is selected for the Type.

4. Click Next. On the sheet that appears, you can specify the name of the project folder that will contain the files related to your project. Here, you can also specify where you want that project folder stored.

5. Click the Create button to create your new project. Xcode then opens a project window.
Note: Your window might look different if you’ve used Xcode before or have changed any of its options.

6. You can close that pane by deselecting the third icon listed in the View category in the top-right corner of your Xcode toolbar. Note that the categories are not labelled by default. To get the labels to appear, right-click in the Toolbar and select Icon and Text.