Skip to main content

Overview

Present Encore retention offers when users dismiss your RevenueCat paywall without converting.

Presenting Offers

Option 1: Using PaywallView

If you’re using RevenueCat’s PaywallView component, use the onRequestDismiss callback to trigger Encore:
import RevenueCat
import RevenueCatUI
import Encore

PaywallView(
    placement: "your_placement",
    params: [String: Any]?,
    paywallOverrides: PaywallOverrides?,
    onRequestDismiss: { paywallInfo, paywallResult in
        // User dismissed without purchasing - trigger Encore
        Encore.placement().show()
    },
    feature: (() -> Void)?
)

Option 2: Using presentPaywallIfNeeded Modifier

If you’re using the .presentPaywallIfNeeded modifier, use the onDismiss callback:
import RevenueCat
import RevenueCatUI
import Encore

YourView()
    .presentPaywallIfNeeded(
        presentationMode: {.fullScreen, .sheet, .default},
        onDismiss: {
            // User dismissed without purchasing - trigger Encore
            Encore.placement().show()
        }
    )
Use the same fluent API documented here: placement()