Presents a paywall view as a modal
Presentation options
OptionaliosPresentationStyle?: AdaptyIOSPresentationStyleiOS presentation style. Available options: 'full_screen' (default) or 'page_sheet'. Only affects iOS platform.
Sets event handlers for paywall view events
OptionaleventHandlers: Partial<EventHandlers> = {}set of event handling callbacks
unsubscribe - function to unsubscribe all listeners
Each event type can have only one handler — new handlers replace existing ones. Default handlers are set during view creation: DEFAULT_EVENT_HANDLERS
onCloseButtonPress - closes paywall (returns true)onAndroidSystemBack - closes paywall (returns true)onRestoreCompleted - closes paywall (returns true)onRenderingFailed - closes paywall (returns true)onPurchaseCompleted - closes paywall on success (returns purchaseResult.type !== 'user_cancelled')onUrlPress - opens URL and keeps paywall open (returns false)If you want to override these listeners, we strongly recommend to return the same value as the default implementation from your custom listener to retain default behavior.
Important: Calling this method multiple times will override only the handlers you provide, keeping previously set handlers intact.
Presents an alert dialog
A config for showing the dialog.
A Promise that resolves to the AdaptyUiDialogActionType object
Use this method instead of RN alert dialogs when paywall view is presented. On Android, built-in RN alerts appear behind the paywall view, making them invisible to users. This method ensures proper dialog presentation above the paywall on all platforms.
If you provide two actions in the config, be sure primaryAction cancels the operation
and leaves things unchanged.
Provides methods to control created paywall view