I am using Phonegap with ngCordova and AngularJS. I am trying to use the following plugin (PhoneGap-Image-Resizer) to help me save some media to the device. My issue is that my plugin is giving me the following error:

[phonegap] [console.error] Error: undefined is not an object (evaluating '$window.imageResizer.getImageSize')

This only happens when i check the app on my device, when I run it locally through localhost:3000 I do not get the error. I get similar results when running a console log after the DeviceReady call. In the browser it is fine, where on the device it is undefined.

After a lot of research I have seen a few check the cordova.js file is being referenced in my index.html, which as you can see below it is:

Ah I see so because i was using the Phonegap Developer app to test it and that uses hydration that is why it wasn't updating. That makes sense. So i will upload it to build and see if it fixes the issue. (Once i have fixed a few of the javascript errors of course )

The PhoneGap Developer app doesn't support any plugins that aren't already built-in. This means core plugins and a smattering of third-party plugins are the only ones you can safely use with the PGDev app. To test with other plugins, you'll need to create a build using either the CLI or PhoneGap Build.