An object containing the location and unique identifier of an Apple App Store storefront.
Mac Catalyst 13.0+
In-app products you create through App Store Connect are available for sale in every region with an App Store. You can use the storefront information to determine the customer's region, and offer in-app products suitable for that region. StoreKit exposes SKStorefront storefront information as a read-only property in SKPaymentQueue.
You must maintain your own list of product identifiers and the storefronts in which you want to make them available.
Show Products Based on the Current Storefront
The following example function shouldShow returns false if your product is not suitable for the given storefront. You must create your own list of products available by storefront, referred to as myProducts in Listing 1.
Listing 2 requests information for products that you wish to display based on the device's storefront. It uses the shouldShow function defined in Listing 1.
Listen for Storefront Changes
The storefront value can change at any time. To listen for changes in this value, implement the paymentQueueDidChangeStorefront(_:) method. Refresh the list of your available products when the storefront changes, as shown in Listing 3. The shouldShow function is defined in Listing 1.
Respond to Storefront Changes
The current storefront can change at any time, including during a transaction. Listing 4 determines whether the transaction should continue in the updated storefront. Your delegate's paymentQueue(_:shouldContinue:in:) method must return quickly, before the call times out. The shouldShow function is defined in Listing 1.