How to make a document app?
Generated on 9/24/2024
1 search
To create a document app, you can follow the guidance provided in the session titled "Evolve your document launch experience" from WWDC 2024. Here are some key steps and features to consider:
-
Adopt the New Launch Experience:
- For SwiftUI apps, use the
document group
scene to specify the document providing closure and the view that displays the open document. This allows your app to display the system document browser on launch. - For UIKit apps, set the
UI document view controller
as the root view controller and apply customizations to the launch options.
- For SwiftUI apps, use the
-
Customization Options:
- Customize the launch screen with a unique design that reflects your app's identity. You can add decorative views, such as images or custom views, to make the launch experience unique.
- Use the
accessory view builder
parameter to add elements specific to your app, like images or other UI components.
-
Template Support:
- Many apps offer the ability to create documents from app-defined templates. This can be a great starting point for documents that need to adhere to a consistent format, layout, or style.
- In SwiftUI, you can add a button to choose a template, which calls an async closure to return a document created from a template.
- In UIKit, define a
UI document creation intent
to represent your document template and handle requests for new documents.
-
APIs and Enhancements:
- Utilize new APIs introduced in iOS 18 to further enhance your app's launch experience and make it stand out.
For more detailed guidance, you can refer to the session Evolve your document launch experience (02:18) for SwiftUI and Evolve your document launch experience (03:13) for UIKit.
What’s new in SwiftUI
Learn how you can use SwiftUI to build great apps for any Apple platform. Explore a fresh new look and feel for tabs and documents on iPadOS. Improve your window management with new windowing APIs, and gain more control over immersive spaces and volumes in your visionOS apps. We’ll also take you through other exciting refinements that help you make expressive charts, customize and layout text, and so much more.
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.
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.