App protocol

E215101

The App protocol is a core SwiftUI construct that defines an app’s entry point and overall lifecycle, replacing the traditional UIApplicationDelegate-based setup.

All labels observed (1)

Label Occurrences
App protocol canonical 1

How this entity was disambiguated

Statements (46)

Predicate Object
instanceOf SwiftUI protocol
bodyReturnType Scene
canCoexistWith AppKit lifecycle via NSApplicationDelegateAdaptor
UIKit lifecycle via UIApplicationDelegateAdaptor
category application lifecycle API
commonlyUsedSceneType DocumentGroup
Settings
WindowGroup
configuredIn Swift source file
conformsTo Swift protocol
definedIn SwiftUI
surface form: SwiftUI framework
designGoal simplify app lifecycle management
unify app structure across Apple platforms
documentedAt Apple Developer Documentation
enables SwiftUI-only app lifecycle
declarative app structure
entryPointDefinedBy @main struct MyApp: App
integratesWith Environment values such as scenePhase
introducedIn Swift
surface form: Swift 5.3
introducedInOSVersion iOS 14
macOS 11
tvOS 14
watchOS
surface form: watchOS 7
language Swift
lifecycleModel scene-based lifecycle
ownedBy Apple Inc.
primaryRole define app entry point
manage app lifecycle
relatedTo NSApplicationDelegate
Scene protocol (SwiftUI)
UIApplicationDelegate
WindowGroup (SwiftUI)
replaces NSApplicationDelegate-based app setup
UIApplicationDelegate-based app setup
replacesFileType @UIApplicationMain entry
NSApplicationMain entry
main.m
requiresProperty var body: some Scene
supportsFeature multiple windows on supported platforms
scene phase handling
supportsPlatform iOS
macOS
tvOS
watchOS
typicalUsage @main struct MyApp: App { var body: some Scene { WindowGroup { ContentView() } } }
usedWithAttribute @main

How these facts were elicited

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

SwiftUI usesConcept App protocol