requestStorefrontIdentifier(completionHandler:)
Gets the device’s storefront identifier.
Declaration
func requestStorefrontIdentifier(completionHandler: @escaping @Sendable (String?, (any Error)?) -> Void)func requestStorefrontIdentifier() async throws -> StringParameters
- 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 Unknown, Cloudservicepermissiondenied, and 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.