Contents

App organization

Define the entry point and top-level structure of your app.

Overview

Describe your app’s structure declaratively, much like you declare a view’s appearance. Create a type that conforms to the App protocol and use it to enumerate the Scenes that represent aspects of your app’s user interface.

[Image]

SwiftUI enables you to write code that works across all of Apple’s platforms. However, it also enables you to tailor your app to the specific capabilities of each platform. For example, if you need to respond to the callbacks that the system traditionally makes on a UIKit, AppKit, or WatchKit app’s delegate, define a delegate object and instantiate it in your app structure using an appropriate delegate adaptor property wrapper, like UIApplicationDelegateAdaptor.

For platform-specific design guidance, see Getting started in the Human Interface Guidelines.

Topics

Creating an app

Targeting iOS and iPadOS

Targeting macOS

Targeting watchOS

Targeting tvOS

Handling system recenter events

See Also

App structure