What is the entry point in my app created using newest Xcode?
Asked on 2025-01-10
1 search
The entry point for your app created using the newest Xcode depends on whether you are using SwiftUI or UIKit.
For SwiftUI apps, the entry point is typically defined by a @main
struct that conforms to the App
protocol. This struct contains a body
property that defines the app's scenes, which are the building blocks of the app's user interface. You can start by creating a new SwiftUI app in Xcode and defining your app's structure using scenes like WindowGroup
.
For UIKit apps, the entry point is usually the AppDelegate
class, which conforms to the UIApplicationDelegate
protocol. The AppDelegate
is responsible for handling app lifecycle events. In the context of document-based apps, you can make the UIDocumentViewController
the root view controller and apply your customizations to the launch options, as mentioned in the session Evolve your document launch experience.
If you are interested in learning more about SwiftUI essentials, you can refer to the session SwiftUI essentials.

SwiftUI essentials
Join us on a tour of SwiftUI, Apple’s declarative user interface framework. Learn essential concepts for building apps in SwiftUI, like views, state variables, and layout. Discover the breadth of APIs for building fully featured experiences and crafting unique custom components. Whether you’re brand new to SwiftUI or an experienced developer, you’ll learn how to take advantage of what SwiftUI has to offer when building great apps.

Tailor macOS windows with SwiftUI
Make your windows feel tailor-made for macOS. Fine-tune your app’s windows for focused purposes, ease of use, and to express functionality. Use SwiftUI to style window toolbars and backgrounds. Arrange your windows with precision, and make smart decisions about restoration and minimization.

Evolve your document launch experience
Make your document-based app stand out, and bring its unique identity into focus with the new document launch experience. Learn how to leverage the new API to customize the first screen people see when they launch your app. Utilize the new system-provided design, and amend it with custom actions, delightful decorative views, and impressive animations.