What is the entry point in my app created using newest Xcode?

Generated on 1/10/2025

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

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

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

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.

Bring your app to Siri

Bring your app to Siri

Learn how to use App Intents to expose your app’s functionality to Siri. Understand which intents are already available for your use, and how to create custom intents to integrate actions from your app into the system. We’ll also cover what metadata to provide, making your entities searchable via Spotlight, annotating onscreen references, and much more.

What’s new in UIKit

What’s new in UIKit

Explore everything new in UIKit, including tab and document launch experiences, transitions, and text and input changes. We’ll also discuss better-than-ever interoperability between UIKit and SwiftUI animations and gestures, as well as general improvements throughout UIKit.