WWDC23: StoreKit views

WWDC23 introduced StoreKit views. This collection of SwiftUI views consists of StoreView, ProductView and SubcriptionStoreView.

StoreView

In this screenshot, a collection of Product Ids is passed to the StoreView‘s initializer and its view takes care of rendering the Product prices, title, and description as seen.

ProductView

Here the “Best Value” Product is placed at the top using StoreKit views’ ProductView. The remaining two Products are arranged in a horizontal ScrollView. To achieve the prominent view a .productViewStyle modifier is set on the “Best Value” Product.

SubscriptionStoreView

The SubscriptionStoreView really delivers all the UI included below, such as the radio buttons seen in the UI. There are still customizations that as developers we can achieve, for example, passing in a closure for the header and styling the background container, etc. The currently selected Product button actions are also customizable via the .subscriptionStoreButtonLabel(.action) modifier. Options for the CTA on the “Subscribe” button include: .action, .automatic, displayName, multiline, price and singleLine.

Resources

Leave a comment