Install Xcode and Create Your First iOS App

IOS Development 12 min min read Updated: Nov 16, 2026 Beginner
Install Xcode and Create Your First iOS App
Beginner Topic 2 of 5

Step 1: Install Xcode

  1. Open the Mac App Store and search for Xcode.
  2. Click Get and wait for the download. It is a very large file.
  3. Open Xcode once and accept the license. Let it install the extra components.
  4. On first launch you may also be asked to download the iOS platform and simulator. Allow it.
Version note: Apple requires apps submitted to the App Store to be built with Xcode 26 or later (iOS 26 SDK) since April 28, 2026. So install the newest stable Xcode that your Mac supports. Check developer.apple.com/xcode/system-requirements for macOS requirements.

Step 2: Create a New Project

  1. Open Xcode and choose Create New Project (or File > New > Project).
  2. Select the iOS tab and the App template. Click Next.
  3. Product Name: HelloApp
  4. Team: choose your Apple ID (or None for the Simulator)
  5. Organization Identifier: something like com.yourname
  6. Interface: SwiftUI
  7. Language: Swift
  8. Storage: None for now. Testing options can stay as they are.
  9. Click Next and choose a folder to save the project.

Step 3: Run the App

  1. At the top of the window choose a simulator, for example iPhone 16 Pro (or the newest one in the list).
  2. Press the Play button (or Cmd + R).
  3. Wait while the Simulator starts and shows your app.

You will see a globe icon and the text Hello, world!. Congratulations, that is a real iOS app.

Step 4: Read the Code

swift import SwiftUI struct ContentView: View { var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundStyle(.tint) Text("Hello, world!") } .padding() } } #Preview { ContentView() }
CodeMeaning
import SwiftUIUse the SwiftUI framework
struct ContentView: ViewA screen (view). Every view conforms to the View protocol
var body: some ViewDescribes what the view looks like. Required by every view
VStackPuts its children in a vertical stack
Image(systemName:)Shows an SF Symbol, one of thousands of built-in icons
TextShows text
.padding()A modifier that adds space around the view
#PreviewShows a live preview in the Xcode canvas

Step 5: Change It

swift struct ContentView: View { var body: some View { VStack(spacing: 16) { Image(systemName: "iphone") .font(.system(size: 60)) .foregroundStyle(.blue) Text("My first iPhone app") .font(.title) .fontWeight(.bold) Text("Built with SwiftUI") .foregroundStyle(.secondary) } .padding() } }

Save with Cmd + S. If the canvas is hidden, open it with Editor > Canvas (or Option + Cmd + Return) and press Resume to see the live preview.

Run on Your Real iPhone (Optional)

  1. Connect your iPhone with a cable and trust the computer.
  2. On the iPhone enable Developer Mode in Settings > Privacy & Security.
  3. In Xcode, open the project settings > Signing & Capabilities, tick Automatically manage signing and choose your Team.
  4. Select your iPhone as the run destination and press Play.
Common problem: If you see a signing error, make sure a Team (your Apple ID) is selected and the Bundle Identifier is unique, for example com.yourname.HelloApp.

Conclusion

You installed Xcode, built a SwiftUI app and ran it on the Simulator. The preview canvas lets you see changes instantly while you write code.

Quick Summary: Create an iOS App project with SwiftUI, press Run to start the Simulator and edit ContentView to change the screen.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators