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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.