Where do I find cordova.js? Where do I find cordova.js? javascript javascript

Where do I find cordova.js?


I wasted a lot of time looking for a solution on the question "Where get the cordova.js?".
I am developing a mobile app using html+css+jQuery mobile and i am building it using the phonegap web build service. The version of phonegap i am working on is 3.1.0.

I was trying to find how to use the Phonegap API on my mobile application and how to call the cordova methods (ex notification.alert). The solution to this is to just add the

<script type="text/javascript" charset="utf-8" src="cordova.js"></script>  

inside the head of your index.html document. The Phonegap builder will find and include the correct cordova.js file for each build (Android, Win phone, iOS).

Finally, the ondeviceready event is essential to any application. See the Full Example.


Check the cordova.js inside the new project created (by using command line)

OR

CHECK YOUR LIB FOLDE INSIDE THE DOWNLOADED CORDOVA ZIP FILE

enter image description here

enter image description here

FOR IOS CHECK cordovalib folder

enter image description here

enter image description here

ANDROID

enter image description here

Please check libs folder of each platform.


I also wasted a lot of time trying to figure out what was going on here, because not even George's solution was working for me.

Finally I realized that, as my index.html page is not in the root of the www folder, but inside a subdirectory of it, I should be then setting a relative path for the cordova file (i.e. src="../cordova.js").

Hope it helps anyone else having the same [dumb] issue.