<!--
{
  "documentType" : "article",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/storekit-views",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "StoreKit views"
}
-->

# StoreKit views

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

## Discussion

The StoreKit views APIs provide UI to help you build a store for your Apple 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.

> Related session from WWDC23:
> Session 10013: [Meet StoreKit for SwiftUI](https://developer.apple.com/videos/play/wwdc2023/10013)

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 Apple 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`](/documentation/StoreKit/StoreView), [`ProductView`](/documentation/StoreKit/ProductView), or [`SubscriptionStoreView`](/documentation/StoreKit/SubscriptionStoreView). Finally, customize the default views to match your app by using your own icons, backgrounds, and other styling. Use <doc://com.apple.documentation/documentation/SwiftUI/Previews-in-Xcode> to see your progress as you iterate on your design.

For more information on configuring your Apple In-App Purchase metadata, see [Manage Apple In-App Purchases](https://help.apple.com/app-store-connect/#/devae49fb316). For more information on StoreKit configuration files in Xcode, see <doc://com.apple.documentation/documentation/Xcode/setting-up-storekit-testing-in-xcode>.

## Topics

### Merchandising Apple In-App Purchases, subscriptions, and offers

[`struct ProductView`](/documentation/StoreKit/ProductView)

A view that merchandises an individual Apple In-App Purchase product.

[`struct StoreView`](/documentation/StoreKit/StoreView)

A view that merchandises a collection of Apple In-App Purchase products.

[`struct SubscriptionStoreView`](/documentation/StoreKit/SubscriptionStoreView)

A view that merchandises a collection of auto-renewable subscription options that belong to the same subscription group.

[`struct SubscriptionOfferView`](/documentation/StoreKit/SubscriptionOfferView)

  <doc://com.apple.documentation/documentation/SwiftUI/Backyard-birds-sample>

### Styling product views

  <doc://com.apple.documentation/documentation/SwiftUI/View/productViewStyle(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/productIconBorder()>

[`protocol ProductViewStyle`](/documentation/StoreKit/ProductViewStyle)

A type that specifies the appearance and interaction of Apple In-App Purchase products within the view hierarchy.

[`struct ProductViewStyleConfiguration`](/documentation/StoreKit/ProductViewStyleConfiguration)

The properties of an Apple In-App Purchase product for use by custom product view styles.

### Styling subscription store controls

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlStyle(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlStyle(_:placement:)>

[`protocol SubscriptionStoreControlStyle`](/documentation/StoreKit/SubscriptionStoreControlStyle)

A type that specifies the appearance and interaction of controls in the subscription store view instances within the view hierarchy.

[`struct SubscriptionStoreControlStyleConfiguration`](/documentation/StoreKit/SubscriptionStoreControlStyleConfiguration)

The properties of a subscription store control that includes the list of auto-renewable subscriptions to merchandise.

[`protocol SubscriptionStoreControlPlacement`](/documentation/StoreKit/SubscriptionStoreControlPlacement)

A type that specifies the placement of a subscription control in a subscription store view.

### Styling subscription offer views

[`struct AutomaticSubscriptionOfferViewStyle`](/documentation/StoreKit/AutomaticSubscriptionOfferViewStyle)

[`struct CompactSubscriptionOfferViewStyle`](/documentation/StoreKit/CompactSubscriptionOfferViewStyle)

[`struct SubscriptionOfferViewStyleConfiguration`](/documentation/StoreKit/SubscriptionOfferViewStyleConfiguration)

[`protocol SubscriptionOfferViewStyle`](/documentation/StoreKit/SubscriptionOfferViewStyle)

### Configuring subscription store controls

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlIcon(icon:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePickerItemBackground(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePickerItemBackground(_:in:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreButtonLabel(_:)>

[`struct SubscriptionStoreButtonLabel`](/documentation/StoreKit/SubscriptionStoreButtonLabel)

The label of the subscribe button that a subscription store view uses.

### Creating custom subscription store control styles

[`struct SubscriptionStoreButton`](/documentation/StoreKit/SubscriptionStoreButton)

A button for subscribing to an in-app subscription with a localized label and optional caption.

[`struct SubscriptionStorePicker`](/documentation/StoreKit/SubscriptionStorePicker)

A composite control with a picker for selecting a subscription option and a button for confirming the subscription.

[`struct SubscriptionStorePickerOption`](/documentation/StoreKit/SubscriptionStorePickerOption)

A subscription option within a subscription picker control.

### Declaring the structure of a subscription store

[`struct SubscriptionOptionGroup`](/documentation/StoreKit/SubscriptionOptionGroup)

A group of subscription options that includes optional views for labels and marketing content.

[`struct SubscriptionOptionGroupSet`](/documentation/StoreKit/SubscriptionOptionGroupSet)

A set of groups of subscription options that include optional views for labels and marketing content.

[`struct SubscriptionPeriodGroupSet`](/documentation/StoreKit/SubscriptionPeriodGroupSet)

[`struct SubscriptionOptionSection`](/documentation/StoreKit/SubscriptionOptionSection)

[`protocol StoreContent`](/documentation/StoreKit/StoreContent)

A type that represents the content of a store.

[`struct StoreContentBuilder`](/documentation/StoreKit/StoreContentBuilder)

A result builder that creates store content from closures that you provide.

### Styling subscription option groups

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreOptionGroupStyle(_:)>

[`func subscriptionStoreOptionGroupStyle(some SubscriptionOptionGroupStyle) -> some StoreContent`](/documentation/StoreKit/StoreContent/subscriptionStoreOptionGroupStyle(_:))

[`protocol SubscriptionOptionGroupStyle`](/documentation/StoreKit/SubscriptionOptionGroupStyle)

### Adding backgrounds to subscription stores

  <doc://com.apple.documentation/documentation/SwiftUI/View/containerBackground(_:for:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/containerBackground(for:alignment:content:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlBackground(_:)-7jxa9>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreControlBackground(_:)-7ev89>

  <doc://com.apple.documentation/documentation/SwiftUI/ContainerBackgroundPlacement/subscriptionStore>

  <doc://com.apple.documentation/documentation/SwiftUI/ContainerBackgroundPlacement/subscriptionStoreHeader>

  <doc://com.apple.documentation/documentation/SwiftUI/ContainerBackgroundPlacement/subscriptionStoreFullHeight>

[`struct SubscriptionStoreControlBackground`](/documentation/StoreKit/SubscriptionStoreControlBackground)

### Configuring accessory buttons

  <doc://com.apple.documentation/documentation/SwiftUI/View/storeButton(_:for:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStoreSignInAction(_:)>

[`struct StoreButtonKind`](/documentation/StoreKit/StoreButtonKind)

A button to display in a store view or subscription store view.

[`struct SubscriptionOfferViewButtonKind`](/documentation/StoreKit/SubscriptionOfferViewButtonKind)

### Configuring the subscription store policies

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePolicyDestination(for:destination:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePolicyDestination(url:for:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePolicyForegroundStyle(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStorePolicyForegroundStyle(_:_:)>

[`struct SubscriptionStorePolicyKind`](/documentation/StoreKit/SubscriptionStorePolicyKind)

The type of policy, such as the terms of service or privacy policies.

### Selecting subscription offers

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionPromotionalOffer(offer:signature:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/preferredSubscriptionOffer(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/offerCodeRedemption(isPresented:onCompletion:)>

### Configuring purchase options and product descriptions

  <doc://com.apple.documentation/documentation/SwiftUI/View/inAppPurchaseOptions(_:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/productDescription(_:)>

### Responding to store events

  <doc://com.apple.documentation/documentation/SwiftUI/View/onInAppPurchaseStart(perform:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/onInAppPurchaseCompletion(perform:)>

### Loading StoreKit data

  <doc://com.apple.documentation/documentation/SwiftUI/View/storeProductTask(for:priority:action:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/storeProductsTask(for:priority:action:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/currentEntitlementTask(for:priority:action:)>

  <doc://com.apple.documentation/documentation/SwiftUI/View/subscriptionStatusTask(for:priority:action:)>

[`enum CollectionTaskState`](/documentation/StoreKit/Product/CollectionTaskState)

The state of a task that loads a collection of products in the background.

[`enum TaskState`](/documentation/StoreKit/Product/TaskState)

The state of a task that loads a product in the background.

[`enum EntitlementTaskState`](/documentation/StoreKit/EntitlementTaskState)

The state of an entitlement task.

### Requesting a refund

  <doc://com.apple.documentation/documentation/SwiftUI/View/refundRequestSheet(for:isPresented:onDismiss:)>



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)