PaywallPresentationHandler
A handler class that provides status updates for paywall presentation in register() calls.
Use this handler when you need fine-grained control over paywall events for a specific register()
call, rather than global events via SuperwallDelegate
.
This handler is specific to the individual register()
call. For global paywall events across your app, use SuperwallDelegate
instead.
Purpose
Provides callbacks for paywall lifecycle events when using register()
with a specific handler instance.
Signature
Parameters
Method | Parameters | Description |
---|---|---|
onPresent | handler: (PaywallInfo) -> Void | Sets a handler called when the paywall is presented. |
onDismiss | handler: (PaywallInfo, PaywallResult) -> Void | Sets a handler called when the paywall is dismissed. |
onSkip | handler: (PaywallSkippedReason) -> Void | Sets a handler called when paywall presentation is skipped. |
onError | handler: (Error) -> Void | Sets a handler called when an error occurs during presentation. |
Returns / State
Each method returns Void
and configures the handler for the specific paywall lifecycle event.
Usage
Basic handler setup:
Handle skip and error cases:
Method chaining style:
How is this guide?