Contents

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