Instance Method

requestStorefrontCountryCode(completionHandler:)

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

Declaration

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

Parameters

completionHandler

A block that is called when the storefront country code is returned. The block takes the following parameters:

storefrontCountryCode

The country code of a specific storefront.

error

An error value that indicates the reason for failure. See SKError.Code for possible error values.

Discussion

You need to get the appropriate storefront country code before you specify a product as each country contains different products.

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 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.