100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Programming

Installing Xcode and Setup

How to install Xcode, set up a new Objective-C project, and compile Objective-C from the command line.

FoundationsBeginner7 min readJul 10, 2026
Analogies

Installing Xcode and Setup

Objective-C development on Apple platforms is done through Xcode, Apple's official IDE, which bundles the clang compiler, Interface Builder, and the iOS/macOS SDKs into a single free download available from the Mac App Store or Apple's developer site. Xcode requires a Mac running a supported version of macOS, and installing it also installs the Command Line Tools needed to compile Objective-C from a terminal.

🏏

Cricket analogy: Like a cricket academy that hands a young player one all-in-one kit, bat, pads, gloves, helmet, rather than making them source each piece separately, Xcode bundles the compiler, editor, and SDKs into one download.

Setting Up a Command-Line Objective-C Project

To create a new Objective-C project, open Xcode, choose File > New > Project, select the macOS or iOS 'Command Line Tool' or 'App' template, and when prompted for a language explicitly choose Objective-C from the dropdown, since recent Xcode versions default new projects to Swift. Xcode then scaffolds a project with a main.m file and, for app targets, an AppDelegate pair of .h/.m files ready to build.

🏏

Cricket analogy: Like a fresh net session where the coach hands you a specific willow bat rather than the default kashmir one racked at the front, choosing Objective-C in Xcode's template picker overrides the default Swift selection.

Command Line Tools and clang

Beyond Xcode's GUI, running xcode-select --install in Terminal installs the standalone Command Line Tools, which include the clang compiler that Objective-C ultimately depends on. With those tools present, a single .m file can be compiled directly from the terminal using a command such as clang -framework Foundation hello.m -o hello, without ever opening the Xcode application itself.

🏏

Cricket analogy: Like a bowler practicing yorkers alone in a concrete-strip backyard net without needing the full stadium, a developer can compile a .m file with plain clang in Terminal without needing the full Xcode app open.

bash
$ xcode-select --install
$ clang -framework Foundation hello.m -o hello
$ ./hello
Hello, World!

Xcode is versioned alongside macOS, for example, Xcode 15 requires macOS Ventura or later, so before installing, check Apple's developer documentation for the minimum macOS version your target Xcode release needs, especially if you're working on an older Mac.

Since Xcode 8, the New Project wizard defaults the language picker to Swift. If you don't explicitly change that dropdown to Objective-C before clicking Next, Xcode will scaffold a Swift project instead, and there is no simple one-click way to convert it afterward, you'd need to start over.

  • Xcode is Apple's official IDE and the only supported way to build full iOS/macOS Objective-C apps.
  • Xcode bundles the clang compiler, Interface Builder, simulators, and the iOS/macOS SDKs in one install.
  • xcode-select --install installs standalone Command Line Tools without requiring the full Xcode GUI.
  • New Xcode projects default to Swift, so Objective-C must be explicitly selected in the language dropdown.
  • A single .m file can be compiled directly with clang -framework Foundation file.m -o output.
  • Xcode version compatibility is tied to macOS version, so check requirements before installing.

Practice what you learned

Was this page helpful?

Topics covered

#Programming#ObjectiveCStudyNotes#InstallingXcodeAndSetup#Installing#Xcode#Setup#Setting#StudyNotes#SkillVeris#ExamPrep