Rovenue React Native SDK
    Preparing search index...

    Interface PresentFunnelOptions

    What presentFunnel takes. Every callback is optional.

    interface PresentFunnelOptions {
        locale?: string;
        onCheck?: FunnelCheckHandler;
        onCustomAction?: (action: { actionId: string; paramsJson: string }) => void;
        onPhotoSelected?: (questionKey: string, photo: FunnelPhotoRef) => void;
        onPurchase?: (
            packageId: string,
            winBackOfferId?: string,
        ) => Promise<{ purchased: boolean }>;
        onPurchaseError?: (error: RovenueError) => void;
        onRestore?: () => Promise<{ purchased: boolean }>;
        onUrl?: (url: string) => void;
        placement: string;
        style?: FunnelPresentationOverride;
        values?: Record<string, string>;
    }
    Index
    locale?: string

    The locale to resolve text in; the device's when omitted.

    Your photo checker; without it a check applies its whenUnavailable.

    onCustomAction?: (action: { actionId: string; paramsJson: string }) => void

    A custom action the funnel runs: its id and its params as JSON.

    onPhotoSelected?: (questionKey: string, photo: FunnelPhotoRef) => void

    A photo_upload question was answered: its key and the photo on the device.

    onPurchase?: (
        packageId: string,
        winBackOfferId?: string,
    ) => Promise<{ purchased: boolean }>

    Perform the purchase of this package yourself; resolve whether it went through. Without it the SDK purchases. While it runs the funnel cannot be swiped or backed away, and it is given as long as it takes: always settle the promise. Throwing or rejecting counts as not purchased.

    winBackOfferId is set for a purchase the funnel sells at the package's win-back offer (a purchase action with "offer": "win_back" on a package the visitor is eligible for): buy it with Rovenue.purchase(pkg, { winBackOffer }), the offer from Rovenue.eligibleWinBackOffers(pkg) with that identifier. Ignoring it buys at the regular price. Without onPurchase the SDK redeems it.

    onPurchaseError?: (error: RovenueError) => void

    Observe a failed purchase or restore the SDK performed. The funnel stays open; a cancelled store sheet is not reported, nor is a failure of your own onPurchase / onRestore.

    onRestore?: () => Promise<{ purchased: boolean }>

    Perform a restore yourself; resolve whether it restored anything. Waited for like onPurchase; throwing or rejecting counts as nothing restored.

    onUrl?: (url: string) => void

    A URL the funnel opens; without it, an http(s) URL opens in the browser.

    placement: string

    The placement identifier.

    Overrides the funnel's own presentation, field by field.

    values?: Record<string, string>

    Values for the funnel's declared externals (an ad's scene, a campaign): trimmed, 512 characters at most, undeclared names dropped. A fresh value overrides a restored one and preselects a defaultFrom question. Never pass personal data: values are written to the on-device session state.