Mobile apps

What is SwiftUI?

SwiftUI is Apple's declarative framework for building user interfaces across iPhone, iPad, Mac, Apple Watch and Apple TV. Developers describe what a screen should look like for the current data, and the system keeps it updated.

What it brings

Short, readable code, live previews in Xcode, automatic support for dark mode, dynamic text size and accessibility, and a single approach to screens on every Apple device.

Where UIKit still appears

UIKit, the older framework, remains behind many mature apps and offers finer control for unusual interactions. The two work side by side, so a project can adopt SwiftUI one screen at a time. Newer features tend to arrive in SwiftUI first, while some advanced behaviors still need UIKit code.

Practical points

  • Each SwiftUI version needs a minimum iOS release, so the oldest iPhone you support affects which features you can use.
  • Teams that need to support many older iOS versions sometimes stay on UIKit longer.
  • Widgets, Live Activities and watch apps are built in SwiftUI, which makes it the natural choice for them.

Questions, answered

For new apps it is usually faster to build with. UIKit stays useful for legacy code and special cases.

Not for its screens, but small native pieces such as a home-screen widget are written in SwiftUI.

By the Stegnor team · Updated