Type Method

requestAuthorization(_:)

Asks the user for permission to access the music library on the device.

Declaration

class func requestAuthorization(_ handler: @escaping (SKCloudServiceAuthorizationStatus) -> Void)

Parameters

handler

A block that is called when authorization is granted or denied by the user.

Discussion

You can use this method to ask the user for permission to play Apple Music tracks or to add tracks to the music library.

See Also

Getting Authorization to Access the Music Library

class func authorizationStatus() -> SKCloudServiceAuthorizationStatus

Returns the type of authorization the user has set for accessing the music library on the device.

enum SKCloudServiceAuthorizationStatus

Constants that indicate the type of authorization the user has set for accessing the music library.