One Logo Pool Ball
_StoreKit_SwiftUI · IOS API REFERENCE

SubscriptionStoreButton

struct · iOS 18.0+ · SDK 27.1

@MainActor @preconcurrency struct SubscriptionStoreButton

A button for subscribing to an in-app subscription. This button is used by standard subscription store control styles. If you implement a custom subscription store control style, you can use this button as part of your style by providing a `SubscriptionStoreControlStyle.Configuration.Option`` value. On iOS, macOS, watchOS, and visionOS you can configure the label of the button by modifying it with `subscriptionStoreButtonLabel(_:)`. Some button label configurations cause the button to have a caption, for example: `.displayName.singleLine`. You can configure the button's style by modifying it with `buttonStyle(_:)`. You don't use this directly except when implementing a `SubscriptionStoreControlStyle`.

Members (1)

init · iOS 18.0+

init

TypeScript
static init(option: SubscriptionStoreControlStyleConfiguration_Option): Promise<SubscriptionStoreButton>
Swift declaration
@MainActor @preconcurrency init(_ option: SubscriptionStoreControlStyleConfiguration.Option)

Creates a button that with an automatic label describing the subscription option, beginning a subscribe interaction when someone triggers the button.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

SubscriptionStoreButton.body

This protocol needs associated types that cannot yet cross the bridge.

All _StoreKit_SwiftUI types →