Asynchronous paywalls
Pre-fetch and customize paywalls display
Last updated
Was this helpful?
Pre-fetch and customize paywalls display
Last updated
Was this helpful?
The feature described in this section is supported on the following versions and above:
iOS: 3.5.0
Android: 3.5.0
ReactNative: 2.5.0
Cordova: 2.5.0
Flutter: 1.5.0
Purchasely, by default, with a loading indicator while fetching the paywall from the network and preparing it for display.
Using Purchasely.fetchPresentation()
method, you can pre-fetch the paywall from the network before displaying it. This provides the following benefits:
Display the paywall only after it has been loaded from the network
Handle network errors gracefully
Show a custom loading screen
Pre-load the paywall while users navigate through your app, such as during onboarding screens
Choose for a specific placement
Display
Call Purchasely.fetchPresentation
for a placement or with a presentation id
An error may be returned if the presentation could not be fetched from the network.
If successful, you will have a PLYPresentation
instance containing the following properties
A presentation can be one of the following types:
Normal: The default behavior, a Purchasely paywall created from our console.
Fallback: A Purchasely paywall, but not the one you requested, as it could not be found.
Deactivated: No with that placement, possibly for a specific A/B test or .
Client: You declared and should . Use the list of plans to determine which offers to display to your users.\