Contents

StoreKit views

Display a customizable In-App Purchase store using StoreKit views for SwiftUI.

Overview

The StoreKit views APIs provide UI to help you build a store for your In-App Purchases, and provide a way for customers to complete the purchase. The views support localization, so your customers see the product names, descriptions, and prices appropriate to their App Store storefront.

StoreKit manages the layouts across all platforms, so the views look great on any device. You can use SwiftUI APIs to customize how the views integrate with your app.

To use StoreKit views, configure your In-App Purchase metadata in App Store Connect, or in a StoreKit configuration file in Xcode if you’re testing your app. Next, create the views using StoreView, ProductView, or SubscriptionStoreView. Finally, customize the default views to match your app by using your own icons, backgrounds, and other styling. Use Previews in Xcode to see your progress as you iterate on your design.

For more information on configuring your In-App Purchase metadata, see Manage In-App Purchases. For more information on StoreKit configuration files in Xcode, see Setting up StoreKit Testing in Xcode.

Topics

Merchandising In-App Purchases, subscriptions, and offers

Styling product views

Styling subscription store controls

Styling subscription offer views

Configuring subscription store controls

Creating custom subscription store control styles

Declaring the structure of a subscription store

Styling subscription option groups

Adding backgrounds to subscription stores

Configuring accessory buttons

Configuring the subscription store policies

Selecting subscription offers

Configuring purchase options and product descriptions

Responding to store events

Loading StoreKit data

Requesting a refund