-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Uncaught ReferenceError: cordova is not defined, http://localhost:8100/lib/push.js, Line: 7 #98
Comments
@siphiwe no, this plugin will work with either Cordova or PhoneGap. Are you adding it manually to your project or are you using the command line interface? |
Thanks for prompt response. I used the cli but copied push.js over into www/lib folder so the app can reference it. Not sure if anything else should've been copied. :-/ |
@siphiwe you should not need to copy the push.js over to your libs folder and add a script tag in your html file. The CLI on the prepare phase will copy the push.js file to the correct location in the platform directory and link it to your app. You should not need to do any manual steps. |
Oh...? Thank you @macdonst |
@siphiwe in the platform directory that you are trying to run in it's www directory there is a file called cordova_plugins.js and that is the plugins that get loaded when you run your app. Sample setup:
Same thing applies to iOS of course. |
Thanks for your trouble @macdonst |
@siphiwe I'd go with John's book as it is relatively up to date: I'm going to close this issue for now but re-open if you have problems in the future. |
Thanks a lot. |
This thread has been automatically locked. |
Hi there,
I'm trying to implement this plugin in my ionic project. The deprecated plugin worked ok but with the new one, where I have the following:
I get this error:
Other plugins that use cordova don't have this issue. I installed it as a cordova plugin. Could it be that it's meant to be strictly phonegap? Any help would be appreciated. Thanks
The text was updated successfully, but these errors were encountered: