Documentation

MusicLibraryPermissionsView

A SwiftUI View that introduces access to a user’s Apple Music Library and receives interaction events for initiating Music permissions from the system.

MusicLibraryPermissionsView with a light color scheme. A SwiftUI Starter Kit Component.
MusicLibraryPermissionsView with a light color scheme.
MusicLibraryPermissionsView with a dark color scheme. A SwiftUI Starter Kit Component.
MusicLibraryPermissionsView with a dark color scheme.

Usage

MusicLibraryPermissionsView(
    interactor: .init(
        didSelectEnable: {
            // Example usage
            //
            // Task {
            //     let authorized = await MusicController.requestAuthorization()
            //     print(authorized)
            // }
        },
        didSelectSkip: {}
    )
)

Features

  • Supports light and dark device color schemes by default.
  • Supports font scaling via Dynamic Type.
  • Supports usage in SwiftUI Previews for easy debugging and testing.