Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 46 ยท Getting Started

The iOS Platform and Ecosystem

What iOS, iPadOS, SwiftUI and UIKit are, how Apple's platforms fit together, how the App Store works, and how this course teaches iOS without a simulator.

iOS is the operating system that runs on the iPhone. Around it sits a whole family of sibling systems, a set of frameworks for building apps, and a store that delivers those apps to more than a billion people. Before you write a line of SwiftUI, it helps to know what these pieces are called, how they relate, and which decisions (like the minimum iOS version) you will have to make early.

This course teaches you to build real iPhone and iPad apps with Swift and SwiftUI. If you are new to the language, work through the Swift tutorial first or alongside this one. The lessons here assume you can read basic Swift: constants, functions, structs and closures.

One family of platforms

iOS The system on iPhone.
iPadOS Same base, built for bigger screens and multitasking.
watchOS Apps on the wrist.
macOS Desktop apps from the same frameworks.

tvOS and visionOS complete the family.

1 / 2

The Apple platform family

Apple ships several operating systems that share a common core and many frameworks:

  • iOS runs on iPhone. This is the main target of the course.
  • iPadOS runs on iPad. It is built from the same code base as iOS, with extra features for large screens such as windows, sidebars and pointer input. Most iPhone apps run on iPad, and a SwiftUI app can adapt to both.
  • macOS runs on Mac, watchOS on Apple Watch, tvOS on Apple TV and visionOS on Apple Vision Pro.

The key point: you write in one language (Swift) with one UI framework (SwiftUI) and reuse large parts of your code across these systems. A Text("Hello") view means the same thing on a phone, a watch and a Mac. The layout and the system look adapt to the device.

Frameworks: the layers under your app

An iOS app is mostly your code calling into Apple's frameworks. A framework is a library with a name you import:

Swift
import SwiftUI      // user interface
import Foundation   // strings, dates, URLs, JSON, files
import SwiftData    // saving model objects to disk
import Charts       // drawing charts

You will meet these gradually. The ones that matter most at the start are SwiftUI for screens and Foundation for everyday data types. Foundation is also available on Linux, which is why many examples in this course can run on our code runner.

Under the frameworks sit the kernel, the file system and the hardware drivers. You never talk to them directly. iOS is a sandboxed system: each app lives in its own container, with its own storage, and must ask the user's permission to use things like the camera, location or notifications.

SwiftUI and UIKit

UIKit arrived with the first iPhone SDK in 2008. You create view objects (UILabel, UIButton), place them on screen, and write code that changes them when something happens. SwiftUI, introduced in 2019, flips this around. You write a function-like description of what the screen should look like for the current data, and the framework updates the real views for you. The next lessons explain this in depth.

Both frameworks run on the same underlying system, and you can mix them. A SwiftUI app can embed a UIKit view, and a UIKit app can host a SwiftUI screen. We cover this in UIKit Interoperability. For a new app today, SwiftUI is the default choice. You will still read UIKit code in older projects and in libraries, so it is useful to recognize it.

Here is the kind of code you will write. This is real SwiftUI, so it is read-only on this site:

Swift
import SwiftUI

struct GreetingView: View {
    var body: some View {
        VStack(spacing: 12) {
            Image(systemName: "hand.wave")
            Text("Hello, iOS")
                .font(.title)
        }
    }
}

Minimum iOS version and availability

Every app declares a deployment target: the oldest iOS version it supports. New APIs appear with every yearly release, so a lower target means more users but fewer features. Each API is marked with the version that introduced it. If you call something newer than your target, the compiler makes you check availability:

Swift
if #available(iOS 17, *) {
    // use an iOS 17 API
} else {
    // fall back for older systems
}

How do you choose? Look at your audience. A common rule is to support the current major version and one or two before it, because most users update quickly. Some features in this course, such as the @Observable macro and SwiftData, need iOS 17 or later, and we say so where they appear. The stand-in below mimics the idea of an availability check so you can see how it works.

Swift A stand-in for #available

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with readLine()), it gets the next line from this box.

With a target of iOS 16, @Observable and SwiftData need a check or a fallback. If you raised the target to 17, both become plain calls.

Distribution: the App Store and beyond

Apps reach users mainly through the App Store. The flow looks like this:

flowchart LR
    A["Write and test<br/>in Xcode"] --> B["Archive and upload<br/>to App Store Connect"]
    B --> C["TestFlight<br/>beta testers"]
    C --> D["App Review"]
    D --> E["Release on<br/>the App Store"]

From Xcode to users: every release passes App Store Connect and App Review.

You need an Apple Developer Program membership to ship to the store. Running your own app on your own iPhone for testing is possible with a free Apple ID, but with limits. Apps must follow the App Review Guidelines, declare what data they collect, and explain why they need each permission. We walk through this in Signing, TestFlight and App Store Release. In some regions, alternative distribution options exist, but the App Store is the path every beginner should learn first.

How this course works without a simulator

Running an iOS app needs Xcode and macOS, and that cannot happen in a web page. So this course uses two kinds of code blocks:

  • Real SwiftUI code is shown in plain read-only blocks, like GreetingView above. Type it into Xcode on a Mac to see the result.
  • Runnable stand-ins are TryIt editors that run ordinary Swift in our code runner. They model the logic behind SwiftUI: how a view tree is built, how state changes produce new output, how data is decoded, how a view model behaves. They are honest simplifications, and each says what it stands in for.

Because most of the interesting decisions in an iOS app, such as where state lives and how data flows, are plain Swift, you can learn and test them here. Visual details like spacing are best checked in Xcode previews, which the next lesson introduces.

You do not need a Mac to read this course, but you need one (or a cloud Mac service) to build and run iOS apps. Xcode only runs on macOS.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which statement about iPadOS and iOS is closest to the truth?

    iPadOS is built from the same foundation as iOS. Most iPhone apps run on iPad, and a SwiftUI app can adapt to both.
  2. 2. What is the main difference between SwiftUI and UIKit?

    SwiftUI is declarative: you describe what the screen looks like for the data. UIKit is imperative: you build and mutate view objects.
  3. 3. What does the deployment target of an app specify?

    The deployment target is the minimum OS version. Calling newer APIs requires an availability check or a higher target.
  4. 4. Why are the runnable examples in this course called stand-ins?

    Real SwiftUI needs Xcode on a Mac. Stand-ins use plain Swift to demonstrate the logic and data flow.

Summary

  • iOS runs on iPhone, iPadOS on iPad; macOS, watchOS, tvOS and visionOS complete the family, all built with Swift.
  • Apps call Apple's frameworks (SwiftUI, Foundation, SwiftData, ...) and run in a sandbox with permission prompts.
  • SwiftUI is declarative and the default for new apps; UIKit is imperative and still common in existing code. They can be mixed.
  • The deployment target sets the oldest supported iOS version; newer APIs need #available checks.
  • Apps ship through App Store Connect, TestFlight and App Review.
  • In this course, real SwiftUI code is read-only and TryIt blocks are runnable Swift stand-ins.

Next: Xcode and Your First SwiftUI App