didReceivePromotedPurchaseStream property

Stream<AdaptyPromotedProduct> get didReceivePromotedPurchaseStream

A broadcast stream of products for App Store promoted in-app purchases. iOS 16.4+ only.

Emits an AdaptyPromotedProduct when the user starts a purchase from your App Store product page rather than from a paywall. It never emits below iOS 16.4, and never in observer mode.

Subscribing takes the purchase over. While at least one subscription is active you are responsible for completing it — call makePromotedPurchase with the product you receive, or the purchase never happens; if your listener fails, the SDK does not step in for it. With no subscription the SDK completes the purchase itself, and cancelling the last subscription restores that. The choice is made for every event, so a stream you listen to only while a screen is mounted hands promoted purchases back to the SDK once that screen is gone.

You can subscribe before calling activate; do, if you want to be certain of catching a purchase that the store delivers at launch.

Implementation

Stream<AdaptyPromotedProduct> get didReceivePromotedPurchaseStream => _didReceivePromotedPurchaseController.stream;