Showing Paywalls
Using the Presentation Handler When Presenting Paywalls
The PaywallPresentationHandler
enables you to monitor and respond to key events during paywall presentation, such as when a paywall is displayed, dismissed, encounters an error, or is skipped.
You can provide a PaywallPresentationHandler
to register
, whose functions provide status updates for a paywall:
onDismiss
: Called when the paywall is dismissed. Accepts aPaywallInfo
object containing info about the dismissed paywall, and there is aPaywallResult
informing you of any transaction.onPresent
: Called when the paywall did present. Accepts aPaywallInfo
object containing info about the presented paywall.onError
: Called when an error occurred when trying to present a paywall. Accepts anError
indicating why the paywall could not present.onSkip
: Called when a paywall is skipped. Accepts aPaywallSkippedReason
enum indicating why the paywall was skipped.
Wanting to see which product was just purchased from a paywall? Use onDismiss
and the result
parameter. Or, you can use the
SuperwallDelegate.