Adapty
Main entry point for interacting with the Adapty SDK.
The Adapty object provides access to all core SDK functionality, including:
Activating and configuring the SDK
Managing user profiles and purchases
Fetching and presenting paywalls and onboardings
Observing subscription updates and installation details
Each public method corresponds to a specific SDK capability. Most functions will return AdaptyResult that can be used to handle success and errors.
Functions
Initializes the Adapty SDK with the specified AdaptyConfig.
Creates a URL for a web paywall or product.
Returns the current installation status of the app.
Fetches an onboarding flow by placement ID.
Fetches onboarding flow for the default audience. This method enables you to retrieve the onboarding from the Default Audience without having to wait for the Adapty SDK to send all the user information required for segmentation to the server.
Fetches a paywall by placement ID. Read more on the Adapty Documentation
Fetches paywall for the default audience. This method enables you to retrieve the paywall from the Default Audience without having to wait for the Adapty SDK to send all the user information required for segmentation to the server.
Retrieves the products for a given paywall.
Retrieves the latest user profile.
Checks whether the SDK is activated.
Logs out the current user.
Logs a paywall view for analytics purposes. Call this method to notify Adapty SDK, that particular paywall was shown to user. Adapty helps you to measure the performance of the paywalls. We automatically collect all the metrics related to purchases except for paywall views. This is because only you know when the paywall was shown to a customer. Whenever you show a paywall to your user, call .logShowPaywall(paywall) to log the event, and it will be accumulated in the paywall metrics.
Performs a purchase for the specified product. Read more on the Adapty Documentation
Opens a web-based paywall or a specific product.
Ios ONLY. Presents a code redemption sheet on iOS that enables the user to redeem codes provided by your app.
Restores previous purchases for the current user.
Sets fallback paywalls from a local asset. You should pass exactly the same payload you’re getting from Adapty backend. You can copy it from Adapty Dashboard. Adapty allows you to provide fallback paywalls that will be used when a user opens the app for the first time and there’s no internet connection or in the rare case when Adapty backend is down and there’s no cache on the device.
Sets an integration identifier for the profile.
Sets the SDK log level.
Sets a listener to receive installation details related to Adapty’s User Acquisition feature.
Sets a listener to automatically receive profile updates in your app.
Updates attribution (conversion) data for the current profile. Read more on the Adapty Documentation
Ios ONLY. Updates the user's consent for collecting refund data on iOS.
Updates the user's profile attributes such as email, phone, or custom fields. You can then use attributes to create user segments or just view them in CRM.
Ios ONLY. Updates the refund preference for iOS.