activateAdapty is undefined when importing in React Native
complete
K
Ken
Hello,
I have followed the React Native installation instructions here:
and I have followed the Release Checklist here:
However, when I run:
import {adapty, activateAdapty} from "react-native-adapty";
console.log("adapty", adapty);
console.log("activateAdapty", activateAdapty);
I see that neither activateAdapty nor adapty.paywalls are defined:
LOG adapty {"activationPromise": null, "addEventListener": [Function anonymous], "bridge": [Function promiseMethodWrapper], "listeners": [], "memoArgs": null, "nativeEmitter": {"_nativeModule": {"addListener": [Function nonPromiseMethodWrapper], "getConstants": [Function anonymous], "handle": [Function promiseMethodWrapper], "removeListeners": [Function nonPromiseMethodWrapper]}}, "shouldWaitUntilReady": false}
LOG activateAdapty undefined
Adapty Support
complete
R
Russ Riser
check your version number. If it's above 2.0.0 then activateAdapty is no longer available.
Adapty recently released a new SDK 2.0. A lot of method names have changed.
You can read their 1.0 -> 2.0 migration guide here: