I'm using ionic and I get the error "store is not defined" when I run the app on Android device. I already tried reinstalling the plugin but still the same. Any idea what is the problem?
[INFO:CONSOLE(21157)] "ReferenceError: store is not defined
This is the code I'm trying:
store.register({
id: "p02",
alias: "premium",
type: store.NON_CONSUMABLE
});
var p = store.get("p02");
I also tested checking if window.store is available but not.
if (!window.store) {
console.log('Store not available');
return;
}
Installed the plugin using:
cordova plugin add cc.fovea.cordova.purchase --variable BILLING_KEY="..."
I'm using ionic and I get the error "store is not defined" when I run the app on Android device. I already tried reinstalling the plugin but still the same. Any idea what is the problem?
[INFO:CONSOLE(21157)] "ReferenceError: store is not defined
This is the code I'm trying:
store.register({ id: "p02", alias: "premium", type: store.NON_CONSUMABLE }); var p = store.get("p02");
I also tested checking if window.store is available but not. if (!window.store) { console.log('Store not available'); return; }
Installed the plugin using: cordova plugin add cc.fovea.cordova.purchase --variable BILLING_KEY="..."
Config.xml:
AndroidManifest.xml: uses-permission android:name="com.android.vending.BILLING"
My system information: Cordova CLI: 5.3.3 Ionic Version: 1.1.0 Ionic CLI Version: 1.7.7 Ionic App Lib Version: 0.6.3