One Logo Pool Ball
_StoreKit_SwiftUI · IOS API REFERENCE

StoreButtonKind

struct · iOS 17.0+ · SDK 27.1

struct StoreButtonKind

A kind of button managed by a store view or subscription store view. Use the `storeButton(_:for:)` modifier on a view to set the visibility of specific button kinds.

Members (5)

get · iOS 17.0+

redeemCode

TypeScript
static get redeemCode(): StoreButtonKind
Swift declaration
static var redeemCode: StoreButtonKind { get }

Refers to buttons which present a form to redeem an offer code for a subscription. Buttons with this purpose are always hidden when the visibility is `automatic`. ``SubscriptionStoreView`` can display buttons with this purpose.

get · iOS 17.0+

cancellation

TypeScript
static get cancellation(): StoreButtonKind
Swift declaration
static var cancellation: StoreButtonKind { get }

Refers to buttons which cancel the current presentation. When the visibility is `automatic`, cancellation buttons are visible only when the `isPresented` environment value is `true`. These buttons call the `dismiss` action environment value. Both the ``StoreView`` and ``SubscriptionStoreView`` are capable of displaying this kind of button.

get · iOS 17.0+

restorePurchases

TypeScript
static get restorePurchases(): StoreButtonKind
Swift declaration
static var restorePurchases: StoreButtonKind { get }

Refers to buttons which restore potential missing in-app purchase content. Restore purchases buttons are never visible when the visibility is `automatic`. These buttons call the `AppStore.sync()` method. Both the ``StoreView`` and ``SubscriptionStoreView`` are capable of displaying this kind of button.

get · iOS 17.0+

signIn

TypeScript
static get signIn(): StoreButtonKind
Swift declaration
static var signIn: StoreButtonKind { get }

Refers to buttons which run a sign in action. When the visibility is `automatic`, buttons with this purpose are visible only when you set a sign in action using the `subscriptionStoreSignInAction(_:)` modifier. ``SubscriptionStoreView`` can display buttons with this purpose.

get · iOS 17.0+

policies

TypeScript
static get policies(): StoreButtonKind
Swift declaration
static var policies: StoreButtonKind { get }

Refers to buttons which present a subscription's terms of service or privacy policy. Buttons with this purpose are always hidden when the visibility is `automatic`. ``SubscriptionStoreView`` can display buttons with this purpose.

Skipped declarations

No declarations were skipped in this snapshot.

All _StoreKit_SwiftUI types →