UNPKG

react-native-qonversion

Version:

Qonversion provides full in-app purchases infrastructure, so you do not need to build your own server for receipt validation. Implement in-app subscriptions, validate user receipts, check subscription status, and provide access to your app features and co

26 lines (25 loc) 1.26 kB
import QonversionConfig from './QonversionConfig'; import QonversionApi from './QonversionApi'; export default class Qonversion { private constructor(); private static backingInstance; /** * Use this variable to get a current initialized instance of the Qonversion SDK. * Please, use the property only after calling {@link Qonversion.initialize}. * Otherwise, trying to access the variable will cause an exception. * * @return Current initialized instance of the Qonversion SDK. * @throws error if the instance has not been initialized */ static getSharedInstance(): QonversionApi; /** * An entry point to use Qonversion SDK. Call to initialize Qonversion SDK with required and extra configs. * The function is the best way to set additional configs you need to use Qonversion SDK. * You still have an option to set a part of additional configs later via calling separate setters. * * @param config a config that contains key SDK settings. * Call {@link QonversionConfigBuilder.build} to configure and create a QonversionConfig instance. * @return Initialized instance of the Qonversion SDK. */ static initialize(config: QonversionConfig): QonversionApi; }