Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Trying to use cordova-plugin-wakeuptimer

$
0
0

@john_naals wrote:

Hi,

I'm trying to integrate https://github.com/wnyc/cordova-plugin-wakeuptimer into an Ionic app, but having issues getting it to work, and not found too muych info when googling.

cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git

just to make sure:

ionic platform rm ios
ionic platform add ios

If I understand correctly, Cordova should automatically add the plugin to the app, so that it's available without having to include the plugin's wakeup.js from the plugins/ dir

I've not created a factory wrapper yet, but I'm getting

Error: Can't find variable: ...

or

Error: undefined is not an object (evaluating '...')

when running

ionic run ios --livereload --consolelogs

with any if the following in main.js

console.log($window.wakeuptimer.wakeup);
console.log(window.wakeuptimer.wakeup); // (obviously, but I tried just in case)
console.log(wakeuptimer.wakeup);
console.log(Wakeup.wakeup);
console.log(wakeup.wakeup);
console.log($window.Wakeup.wakeup);
console.log($window.wakeup.wakeup);
console.log($window.wakeupplugin.wakeup);
.
.
.

I'm probably missing an obvious step, any suggestions?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>