Thuta Learning
BasicMobile Developmentintermediate

Your First App — Hello World

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand Your First App — Hello World, without any of the intimidation
  • Get hands-on running Xcode/SwiftUI code yourself
  • Apply this concept immediately in a real project

Let's think about this for a moment

To run an app on the Simulator (or a physical device), all you have to do is hit Run (▶ or Cmd+R) — Xcode compiles your code, builds the app bundle, and installs/launches it on the Simulator. If you call `ContentView` as the root view inside `WindowGroup { ContentView() }`, that UI will appear immediately when the app launches.

Let's connect this to a real-world scenario

If you write `var body: some View { Greeting(name: "iOS") }` inside `ContentView.swift`, then Run the app, you'll immediately see the text 'Hello, iOS!' appear on the Simulator screen — that's your first real iOS app right there.

Let's look at it together

swift
struct ContentView: View {
    var body: some View {
        Greeting(name: "iOS")
    }
}
You should see
You should see the text 'Hello, iOS!' on the Simulator screen.

Try it in 5 minutes

Edit `ContentView.swift`, add `Greeting(name: "iOS")`, and hit Run (Cmd+R) — confirm the app launches on the Simulator right away.

A quick word of caution

Your first build/Simulator boot can take a few minutes depending on your Mac's performance — watch the progress indicator instead of assuming it's 'stuck.'

Easy traps

  • Hitting Run without the Simulator already booted — Simulator boot time can take a while, especially the first time
  • Skimming past a build error message and giving up with 'I have no idea what this means' — it's important to learn to debug by referencing the error line number in the Issue Navigator

Now try it yourself

Edit `ContentView.swift`, add `Greeting(name: "iOS")`, and hit Run (Cmd+R) — confirm the app launches on the Simulator right away.

You'll know it worked when: You should see the text 'Hello, iOS!' on the Simulator screen.

Your First App — Hello World | Thuta Learning