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
33 lines • 1.36 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Qonversion_1 = __importDefault(require("./Qonversion"));
const AutomationsInternal_1 = __importDefault(require("./internal/AutomationsInternal"));
class Automations {
constructor() { }
/**
* Use this variable to get a current initialized instance of the Qonversion Automations.
* Please, use Automations only after calling {@link Qonversion.initialize}.
* Otherwise, trying to access the variable will cause an error.
*
* @return Current initialized instance of the Qonversion Automations.
* @throws error if Qonversion has not been initialized.
*/
static getSharedInstance() {
if (!this.backingInstance) {
try {
Qonversion_1.default.getSharedInstance();
}
catch (e) {
throw "Qonversion has not been initialized. " +
"Automations should be used after Qonversion is initialized.";
}
this.backingInstance = new AutomationsInternal_1.default();
}
return this.backingInstance;
}
}
exports.default = Automations;
//# sourceMappingURL=Automations.js.map