Class

SKCloudServiceController

An object that determines the current capabilities of the user’s music library.

Overview

Use an SKCloudServiceController object to determine the current capabilities of the user’s music library, like whether the device allows playback of Apple Music catalog tracks and the addition of tracks to the library.

Topics

Getting Authorization to Access the Music Library

class func authorizationStatus()

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

class func requestAuthorization((SKCloudServiceAuthorizationStatus) -> Void)

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

enum SKCloudServiceAuthorizationStatus

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

Determining Capabilities

func requestUserToken(forDeveloperToken: String, completionHandler: (String?, Error?) -> Void)

Returns a user token that you use to access personalized Apple Music content.

func requestStorefrontCountryCode(completionHandler: (String?, Error?) -> Void)

Gets the country code for the storefront associated with a user's iTunes account.

func requestCapabilities(completionHandler: (SKCloudServiceCapability, Error?) -> Void)

Gets the current capabilities associated with the music library on the device.

struct SKCloudServiceCapability

Constants that specify the current capabilities of the user’s music library on the device.

Notifications

static let SKStorefrontIdentifierDidChange: NSNotification.Name

A notification name for indicating a change in the storefront identifier associated with the device.

static let SKCloudServiceCapabilitiesDidChange: NSNotification.Name

A notification name for indicating a change in the capabilities associated with the music library on the device.

static let SKStorefrontCountryCodeDidChange: NSNotification.Name

A notification name for indicating a change in the storefront country code associated with the device.

Relationships

Inherits From

Conforms To