← Back to Tutorials

2. Environment Setup

Getting Started

Installing Xcode

Xcode is available through the Mac App Store. Download and install it — it includes the iOS SDK, Interface Builder, Simulator, and all necessary tools. Minimum requirements: macOS Ventura+ and 20GB free disk space.

Xcode Workspace Layout

Xcode organizes projects into these key areas:

Project Template

When you create a new project, Xcode offers several templates:

File → New → Project
  → iOS → App (recommended for most projects)
  → Choose: SwiftUI or Storyboard
  → Interface: Swift / SwiftUI App Lifecycle
  → Organization Identifier: com.yourname

iOS Simulator

The Simulator runs on your Mac and emulates iPhone and iPad devices. Features include:

Tip: Use Cmd + R to build and run. Use Cmd + B to build without running. Use Shift + Cmd + K to clean the build folder.

Project Structure

A standard iOS project contains:

MyApp/
  ├── AppDelegate.swift     // App lifecycle events
  ├── SceneDelegate.swift   // Scene management (iOS 13+)
  ├── ContentView.swift     // Main view (SwiftUI)
  ├── Assets.xcassets/      // Images, colors, app icon
  ├── Info.plist            // Configuration and permissions
  ├── LaunchScreen.storyboard
  └── MyApp.xcodeproj/      // Project file
Practice Task: Create a new iOS App project called "MyFirstApp" with the SwiftUI template. Explore the different areas of Xcode (Navigator, Editor, Utility, Debug). Run your app in the iPhone 15 Pro Simulator. Add a breakpoint on a Text view and run the debugger.