onInAppPurchaseStart(perform:)
Add an action to perform when a user triggers the purchase button on a StoreKit view within this view.
Declaration
nonisolated func onInAppPurchaseStart(perform action: ((Product) async -> ())?) -> some View
Parameters
- action:
The action to perform, with the product to be purchased provided as a parameter.
Discussion
You can remove any actions ancestor views may have added by providing nil for the action.
See Also
Interacting with the App Store and Apple Music
appStoreOverlay(isPresented:configuration:)manageSubscriptionsSheet(isPresented:)refundRequestSheet(for:isPresented:onDismiss:)offerCodeRedemption(isPresented:onCompletion:)musicSubscriptionOffer(isPresented:options:onLoadCompletion:)currentEntitlementTask(for:priority:action:)inAppPurchaseOptions(_:)manageSubscriptionsSheet(isPresented:subscriptionGroupID:)onInAppPurchaseCompletion(perform:)productIconBorder()productViewStyle(_:)productDescription(_:)storeButton(_:for:)storeProductTask(for:priority:action:)storeProductsTask(for:priority:action:)