get Paywall Sync
fun Superwall.getPaywallSync(request: PresentationRequest, onStateChanged: (PaywallState) -> Unit = {}): Either<PaywallView, Throwable>(source)
Gets a paywall to present synchronously, providing updates on the lifecycle of the paywall through a callback. Warning: This blocks the calling thread until the paywall is returned.
Return
A PaywallView to present.
Parameters
request
A presentation request of type PresentationRequest to feed into a presentation pipeline.
on State Changed
A callback function that receives PaywallState updates.