Instance Method

requestCapabilities(completionHandler:)

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

Declaration

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

Parameters

completionHandler

A block that is called when the device’s current capabilities are determined. The block takes the following parameters:

capabilities

Flags that indicate the device’s capabilities. For possible values, see SKCloudServiceCapability.

error

An error value that indicates the reason for failure. Possible values are SKError.Code.unknown, SKError.Code.cloudServicePermissionDenied, and SKError.Code.cloudServiceNetworkConnectionFailed.

See Also

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.

struct SKCloudServiceCapability

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