Instance Method

requestStorefrontIdentifier(completionHandler:)

Gets the device’s storefront identifier.

Declaration

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

Parameters

completionHandler

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

storefrontIdentifier

The identifier of a specific storefront.

error

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

Discussion

You need to get the appropriate storefront before you specify a product, because product identifiers are meaningful within the context of a store.

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.

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.