Instance Method

requestStorefrontCountryCodeWithCompletionHandler:

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

Declaration

- (void)requestStorefrontCountryCodeWithCompletionHandler:(void (^)(NSString *storefrontCountryCode, NSError *error))completionHandler;

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

- requestUserTokenForDeveloperToken:completionHandler:

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

- requestCapabilitiesWithCompletionHandler:

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

SKCloudServiceCapability

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

- requestStorefrontIdentifierWithCompletionHandler:

Gets the device’s storefront identifier.