Instance Method

purchase(package:promotionalOffer:)

Purchase the passed Package. Call this method when a user has decided to purchase a product with an applied discount. Only call this in direct response to user input. From here Purchases will handle the purchase with StoreKit and call the PurchaseCompletedBlock.

Declaration

func purchase(package: Package, promotionalOffer: PromotionalOffer) async throws -> PurchaseResultData

Parameters

package

The Package the user intends to purchase

promotionalOffer

The PromotionalOffer to apply to the purchase

Discussion

If the user cancelled, userCancelled will be true.

See Also

Making Purchases with Subscription Offers