View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Videos

Abrir menú Cerrar menú
  • Colecciones
  • Todos los videos
  • Información

Más videos

  • Información
  • Código
  • 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.

    Capítulos

    • 0:00 - Introduction
    • 1:01 - Design overview
    • 2:18 - Getting started with SwiftUI
    • 3:13 - Getting started with UIKit
    • 4:11 - Customization
    • 6:42 - Adding template support to your app

    Recursos

    • Building a document-based app with SwiftUI
    • Customizing a document-based app’s launch experience
    • Forum: UI Frameworks
      • Video HD
      • Video SD

    Videos relacionados

    WWDC23

    • Build better document-based apps

    WWDC20

    • Build document-based apps in SwiftUI
  • Buscar este video…
    • 2:38 - Document-based application

      @main
      struct WritingApp: App {
          var body: some Scene {
              DocumentGroup(newDocument: { StoryDocument() }) { file in
                  StoryView(document: $file.document)
              }
          }
      }
    • 3:26 - Presenting a document from the browser in iOS 17

      class DocumentViewController: UIDocumentViewController { ... }
      
      let documentViewController = DocumentViewController()
      let browserViewController = UIDocumentBrowserViewController(
          forOpening: [.plainText]
      )
      window.rootViewController = browserViewController
    • 3:38 - Presenting a document from the browser in iOS 17

      class DocumentViewController: UIDocumentViewController { ... }
      
      let documentViewController = DocumentViewController()
      let browserViewController = UIDocumentBrowserViewController(
          forOpening: [.plainText]
      )
      window.rootViewController = browserViewController
      browserViewController.delegate = self
    • 3:43 - Presenting a document from the browser in iOS 17

      class DocumentViewController: UIDocumentViewController { ... }
      
      let documentViewController = DocumentViewController()
      let browserViewController = UIDocumentBrowserViewController(
          forOpening: [.plainText]
      )
      window.rootViewController = browserViewController
      browserViewController.delegate = self
      
      // MARK: UIDocumentBrowserViewControllerDelegate
      
      func documentBrowser(
          _ browser: UIDocumentBrowserViewController, 
          didPickDocumentsAt documentURLs: [URL]
      ) {
          guard let url = documentURLs.first else { return }
          documentViewController.document = StoryDocument(fileURL: url)
          browser.present(documentViewController, animated: true)
      }
    • 3:56 - Presenting a document from the browser in iOS 18

      class DocumentViewController: UIDocumentViewController { ... }
      
      let documentViewController = DocumentViewController()
      window.rootViewController = documentViewController
    • 4:38 - Customize the document launch experience: background

      DocumentGroup(
          newDocument: { StoryDocument() }
      ) { file in
          StoryView(document: $file.document)
      }
      
      DocumentGroupLaunchScene {
      ...
      } background: {
          Image(.pinkJungle)
              .resizable()
              .aspectRatio(contentMode: .fill)
      }
    • 4:49 - Customize the document launch experience: new document button title

      DocumentGroup(
          newDocument: { StoryDocument() }
      ) { file in
          StoryView(document: $file.document)
      }
      DocumentGroupLaunchScene {
          NewDocumentButton("Start Writing")
      } background: {
          Image(.pinkJungle)
              .resizable()
              .aspectRatio(contentMode: .fill)
      }
    • 5:29 - Customize the document launch experience: accessory views

      DocumentGroupLaunchScene {
          NewDocumentButton("Start Writing")
      } background: {
          Image(.pinkJungle)
              .resizable()
              .aspectRatio(contentMode: .fill)
      } overlayAccessoryView: {
      
      }
    • 5:44 - Position accessory views

      DocumentGroupLaunchScene {
          NewDocumentButton("Start Writing")
      } background: {
          Image(.pinkJungle)
              .resizable()
              .aspectRatio(contentMode: .fill)
      } overlayAccessoryView: { geometry in
      
      }
    • 5:53 - Position accessory views

      DocumentGroupLaunchScene {
          NewDocumentButton("Start Writing")
      } background: {
      ...
      } overlayAccessoryView: { geometry in
          ZStack {
              Image(.robot)
                  .position(
                      x: geometry.titleViewFrame.minX, 
                      y: geometry.titleViewFrame.minY
                  )
              Image(.plant)
                  .position(
                      x: geometry.titleViewFrame.maxX, 
                      y: geometry.titleViewFrame.maxY
                  )
          }
      }
    • 6:11 - Customize the document launch experience in a UIKit app

      class DocumentViewController: UIDocumentViewController {
      
          override func viewDidLoad() {
              super.viewDidLoad()
      
              // Update the background
              launchOptions.background.image = UIImage(resource: .pinkJungle)
      
              // Add foreground accessories
              launchOptions.foregroundAccessoryView = ForegroundAccessoryView()
          }
      }
    • 7:31 - Create a document from a template: add a button

      DocumentGroupLaunchScene {
          NewDocumentButton("Start Writing")
          NewDocumentButton("Choose a Template", for: StoryDocument.self) {
      
          }
      }
    • 7:45 - Create a document from a template: return document later

      @State private var creationContinuation: CheckedContinuation<StoryDocument?, any Error>?
      
      DocumentGroupLaunchScene {
          NewDocumentButton("Start Writing")
          NewDocumentButton("Choose a Template", for: StoryDocument.self) {
              try await withCheckedThrowingContinuation { continuation in
                  self.creationContinuation = continuation
             }
          }
      }
    • 7:56 - Create a document from a template: present a template picker

      @State private var creationContinuation: CheckedContinuation<StoryDocument?, any Error>?
      @State private var isTemplatePickerPresented = false
      
      DocumentGroupLaunchScene {
          NewDocumentButton("Start Writing")
          NewDocumentButton("Choose a Template", for: StoryDocument.self) {
              try await withCheckedThrowingContinuation { continuation in
                  self.creationContinuation = continuation
                  self.isTemplatePickerPresented = true
              }
          }
          .sheet(isPresented: $isTemplatePickerPresented) {
              TemplatePicker(continuation: $creationContinuation
          }
      }
    • 8:07 - Create a document from a template: template picker view

      struct TemplatePicker: View {
          @Binding var creationContinuation: CheckedContinuation<StoryDocument?, any Error>?
      
          var body: some View {
              Button("Three Act Structure") {
                  creationContinuation?.resume(returning: StoryDocument.threeActStructure())
                  creationContinuation = nil
              }
          }
      }
      
      extension StoryDocument {
          static func threeActStructure() -> Self {
              Self.init(...)
          }
      }
    • 8:20 - Create a document from a template in UIKit

      extension UIDocument.CreationIntent {
          static let template = UIDocument.CreationIntent("template")
      }
    • 8:29 - Create a document from a template in UIKit

      launchOptions.secondaryAction = LaunchOptions.createDocumentAction(with: .template) 
      launchOptions.browserViewController.delegate = self
      
      // MARK: UIDocumentBrowserViewControllerDelegate
      
      func documentBrowser(
          _ browser: UIDocumentBrowserViewController, 
          didRequestDocumentCreationWithHandler importHandler: @escaping (URL?, ImportMode) -> Void) 
      {
          switch browser.activeDocumentCreationIntent {
          case .template: 
              presentTemplatePicker(with: importHandler)
          default:
              let newDocumentURL = // ...
              importHandler(newDocumentURL, .copy)
          }
      }

Developer Footer

  • Videos
  • WWDC24
  • Evolve your document launch experience
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines