currentStatus
TypeScriptstatic get currentStatus(): MusicAuthorization_StatusSwift declarationstatic var currentStatus: MusicAuthorization.Status { get }The authorization status the user sets for accessing MusicKit.
struct · iOS 15.0+ · SDK 27.1
struct MusicAuthorizationA type that allows you to request the user’s informed consent for your app to access their music data.
static get currentStatus(): MusicAuthorization_StatusSwift declarationstatic var currentStatus: MusicAuthorization.Status { get }The authorization status the user sets for accessing MusicKit.
static request(): Promise<MusicAuthorization_Status>Swift declarationstatic func request() async -> MusicAuthorization.StatusAsks the user for permission for the current app to access MusicKit. Before using any other MusicKit API in your app, make sure the user grants your app access to their Apple Music data, You can do this either by comparing ``MusicAuthorization/currentStatus`` to ``MusicAuthorization/Status/authorized``, or by simply calling ``MusicAuthorization/request()`` regardless of the current authorization status value. Calling ``MusicAuthorization/request()`` results in presenting a standard user consent dialog to the user when necessary. Requesting authorization to use MusicKit requires the inclusion of a short description of the app’s reason for using MusicKit. You need to add this purpose string to the app’s `Info.plist` file using the [NSAppleMusicUsageDescription](<doc://com.apple.documentation/documentation/bundleresources/information-property-list/nsapplemusicusagedescription>) key.
No declarations were skipped in this snapshot.