Join the waitlistDownload

What is SwiftUI and how does it compare to UIKit

Apple's framework for app interfaces. How it works, which iOS it needs and where to find it in Xcode.

In short

SwiftUI is Apple's framework for building app interfaces in Swift, introduced on June 3, 2019. You describe a screen in code, and the system draws and updates it on iPhone, iPad, Mac, Apple Watch, Apple TV and Vision Pro, starting with iOS 13.

What SwiftUI is

SwiftUI is Apple's framework for building app interfaces in Swift. Apple introduced it on June 3, 2019, at WWDC19 alongside Xcode 11 (Apple's press release). The code is declarative. You describe what a screen is made of and how it depends on your data, say "a list of songs, each with its cover, title and artist". When the data changes, SwiftUI redraws the part that changed.

Every screen, and every piece of one, is a struct that conforms to the View protocol. Modifiers change how an element looks, for example .padding() adds spacing and .font(.title) sets the type. The same code runs on iPhone, iPad, Mac, Apple Watch, Apple TV and Vision Pro.

Where SwiftUI lives in Xcode

There is nothing to install, SwiftUI ships with Xcode and the OS. Start a project at Xcode › File › New › Project › App and pick SwiftUI for Interface (as described in Xcode Help). The file named after your app with App at the end is the entry point, and ContentView.swift is the first screen.

To the right of the code, Xcode shows the canvas with a live preview. It comes from the #Preview macro below the view, and edits in the code show up on the canvas right away.

Versions and Apple's numbers

WhatValue
IntroducedJune 3, 2019, WWDC19, with Xcode 11
Minimum OS versionsiOS and iPadOS 13.0, macOS 10.15, watchOS 6.0, tvOS 13.0, visionOS 1.0
UIKit, for comparisonsince iOS 2.0
Liquid Glass on custom viewsthe glassEffect modifier, since iOS 26.0
Minimum iOS on the App StoreiOS 13, since September 9, 2026
Builds for the App StoreXcode 26 or later, since April 28, 2026
Xcode 27macOS Tahoe 26.6 or later, Apple silicon Macs only, Swift 6.4

Per the SwiftUI documentation, App Store upcoming requirements and the Xcode version table, checked October 16, 2026.

Since September 9, 2026, the App Store only takes apps that target iOS 13 or later, and iOS 13 is exactly where SwiftUI starts. So core SwiftUI fits any app you can upload today. Newer views arrive with each iOS release, and using them means raising your minimum version.

Your first SwiftUI screen, step by step

  1. Open Xcode 26 or later and choose File › New › Project › App.
  2. Enter a name, pick a signing team under Team, set Interface to SwiftUI and click Create.
  3. Open ContentView.swift and describe the screen inside body, for example a VStack with a Text and a Button.
  4. Check that a #Preview { ContentView() } sits below the struct and watch the canvas.
  5. Add a tap counter with @State and check that the label updates by itself.
  6. Pick an iPhone simulator and press Run to try the screen in a real app.
Your first SwiftUI screen in XcodeFive steps to build a first SwiftUI screen in Xcode. 1. A new project via File › New › Project › App in Xcode 26 or later. 2. In the project options, Interface SwiftUI, language Swift, a signing team. 3. The screen is described in ContentView.swift as a View struct and its body property. 4. The #Preview macro shows the screen on the canvas, and code edits appear at once. 5. Run on a simulator or an iPhone with the Run button, SwiftUI runs on iOS 13 and later. Per Xcode Help and the SwiftUI documentation as of October 16, 2026.Your first SwiftUI screen in XcodeFive steps from a new project to a run on the simulator, Xcode 26 and 27, as of October 16, 20261New projectFile › New › Project › AppXcode 26 or later2SwiftUI interfaceInterface › SwiftUISwift language, signing team3Screen in codeContentView.swifta View struct and its body4Preview on canvas#Preview › canvascode edits show at once5RunRun › simulator or iPhoneSwiftUI runs on iOS 13 and later
A new SwiftUI project takes five steps in Xcode, and you see the screen on the canvas before the first run. Per Xcode Help, checked October 16, 2026.

SwiftUI vs UIKit

UIKit has been around since iOS 2.0. There you build screens from view controllers and views and update them yourself when the data changes. SwiftUI takes less code, shows the result on the canvas at once, and one codebase covers iPhone, iPad, Mac and Watch. UIKit still earns its place where you need fine control over scrolling, text or a large existing codebase.

You don't have to pick one, since Apple built SwiftUI to work alongside UIKit and AppKit (SwiftUI page). UIHostingController puts a SwiftUI screen into UIKit, and UIViewRepresentable does the reverse, both since iOS 13.0.

What changed in 2025 and 2026

Since iOS 26, released on September 15, 2025, standard SwiftUI controls pick up the Liquid Glass material on their own once you build with Xcode 26. Custom views use the glassEffect modifier, more on the Liquid Glass page.

In Xcode 27, @State became a macro, so a class stored in it is created lazily, once per view lifetime (what's new in SwiftUI). The Xcode 27 coding assistant also got skills for adopting new SwiftUI features, which helps if you build with an AI agent (vibe coding).

Common mistakes

  • A new view with an old deployment target. If a view arrived in iOS 17 and the project supports iOS 15, the build fails without an if #available check.
  • Shared data in @State. @State holds state for one view. Data several screens need belongs in a model, otherwise the copies drift apart.
  • Heavy work inside body. SwiftUI calls body on every data change, and a network load there makes scrolling stutter.

Appto writes your app in SwiftUI inside a regular Xcode project, walks through every screen on the simulator itself and fixes what it finds. You can check it by hand on the simulator, your own iPhone or through TestFlight, more on the code page.

Questions

Is SwiftUI a programming language?

No. The language is Swift, and SwiftUI is Apple's framework for app screens written in Swift, introduced in June 2019.

Which iOS version does SwiftUI need?

iOS 13.0. On the Mac it needs macOS 10.15, on Apple Watch watchOS 6.0, per Apple's documentation as of October 16, 2026. Newer views need newer versions.

Should a new app use SwiftUI or UIKit?

Usually SwiftUI, since it takes less code and shows a live preview. Any UIKit view you need can be embedded through UIViewRepresentable.

Do I need a Mac for SwiftUI?

Yes. Xcode only runs on the Mac, and Xcode 27 needs macOS Tahoe 26.6 or later and a Mac with Apple silicon (Xcode version table and Xcode 27 release notes, October 17, 2026).

Build your own app in Appto

Appto checks the niche on fresh App Store data, designs the screens, writes the code, builds the App Store page and submits to Apple from your account or shows you what to press in App Store Connect. Runs on your own Claude Code or Codex.

Download for Mac