ChordProviderApp

@main
struct ChordProviderApp : App

SwiftUI Scene for Chord Provider

This is the starting point of the application

Note

Each platform has its own body

Shared

macOS

  • The AppDelegate class for Chord Provider

    Declaration

    Swift

    @NSApplicationDelegateAdaptor
    private var appDelegate: AppDelegate { get }
  • The openWindow environment to open a new Window

    Declaration

    Swift

    @Environment
    private var openWindow: OpenWindowAction { get }
  • The body of the Scene

    The macOS body consist of the following scenes:

    • Window: scene with a list of songs
    • Window: scene to export a folder of songs
    • DocumentGroup scene to open a single song
    • MenuBarExtra scene that shows a list with songs as well
    • Settings scene to open the settings Window

    Declaration

    Swift

    var body: some Scene { get }

Scene Windows

  • The window scenes we can open on macOS

    Note

    The ID of a scene we set on on a Window or to open a Window in the environment is a String. This is is asking for troubles, so I use an enum instead.
    See more

    Declaration

    Swift

    private enum AppSceneID : String

iPadOS

  • The body of the Scene