This document is for people who need to upgrade their Cordova versions from an older version to a current version of Cordova.
1.4.1
Note: 1.5.0 represents a semi-major change to the PhoneGap/Cordova project! All references to PhoneGap have been changed to Cordova.
- To upgrade to 1.5.0, please go from 1.4.1
Updating just the www folder:
- Open your
www/ folder, which contains your app.
- Remove and update the old phonegap.1.4.1.jar file in the
ext/ folder and replace it with cordova.1.5.0.jar.
- Update the contents of the
ext-air/ folder and make sure to rename the folders with Phonegap with them to Cordova.
- Copy the new
cordova-1.5.0.js into your project.
- If playbook, then update the .js file in the
playbook/ folder.
- Update your HTML to use the new
cordova-1.5.0.js file.
- Update your www/plugins.xml file - remember all of the references to PhoneGap need to be changed to Cordova:
From:
name="App" value="com.phonegap.app.App"/>
name="Device" value="com.phonegap.device.Device"/>
name="Camera" value="com.phonegap.camera.Camera"/>
name="Network Status" value="com.phonegap.network.Network"/>
name="Notification" value="com.phonegap.notification.Notification"/>
name="Accelerometer" value="com.phonegap.accelerometer.Accelerometer"/>
name="Geolocation" value="com.phonegap.geolocation.Geolocation"/>
name="File" value="com.phonegap.file.FileManager"/>
name="FileTransfer" value="com.phonegap.http.FileTransfer"/>
name="Contact" value="com.phonegap.pim.Contact"/>
name="MediaCapture" value="com.phonegap.media.MediaCapture"/>
name="Battery" value="com.phonegap.battery.Battery"/>
To:
name="App" value="org.apache.cordova.app.App"/>
name="Device" value="org.apache.cordova.device.Device"/>
name="Camera" value="org.apache.cordova.camera.Camera"/>
name="Network Status" value="org.apache.cordova.network.Network"/>
name="Notification" value="org.apache.cordova.notification.Notification"/>
name="Accelerometer" value="org.apache.cordova.accelerometer.Accelerometer"/>
name="Geolocation" value="org.apache.cordova.geolocation.Geolocation"/>
name="File" value="org.apache.cordova.file.FileManager"/>
name="FileTransfer" value="org.apache.cordova.http.FileTransfer"/>
name="Contact" value="org.apache.cordova.pim.Contact"/>
name="MediaCapture" value="org.apache.cordova.media.MediaCapture"/>
name="Battery" value="org.apache.cordova.battery.Battery"/>
Updating the sample folder (ie, updating using the ant tools):
- Open the
sample/lib/ folder.
- Update the .jar file in the
phonegap.1.4.1/ext/ folder.
- Update the contents of the
phonegap.1.4.1/ext-air/ folder.
- Update the .js file in the
phonegap.1.4.1/javascript/ folder.
- Open the
sample/lib/ folder and rename the cordova.1.4.1/ folder to cordova.1.5.0/.
- Update build.xml to update the ant tools.
- Type
ant blackberry build or ant playbook build to update the www/ folder with updated Cordova.
- Open the
www/ folder and update your HTML to use the new cordova-1.5.0.js file.
- Update your www/plugins.xml file - remember all of the references to PhoneGap need to be changed to Cordova:
From:
name="App" value="com.phonegap.app.App"/>
name="Device" value="com.phonegap.device.Device"/>
name="Camera" value="com.phonegap.camera.Camera"/>
name="Network Status" value="com.phonegap.network.Network"/>
name="Notification" value="com.phonegap.notification.Notification"/>
name="Accelerometer" value="com.phonegap.accelerometer.Accelerometer"/>
name="Geolocation" value="com.phonegap.geolocation.Geolocation"/>
name="File" value="com.phonegap.file.FileManager"/>
name="FileTransfer" value="com.phonegap.http.FileTransfer"/>
name="Contact" value="com.phonegap.pim.Contact"/>
name="MediaCapture" value="com.phonegap.media.MediaCapture"/>
name="Battery" value="com.phonegap.battery.Battery"/>
To:
name="App" value="org.apache.cordova.app.App"/>
name="Device" value="org.apache.cordova.device.Device"/>
name="Camera" value="org.apache.cordova.camera.Camera"/>
name="Network Status" value="org.apache.cordova.network.Network"/>
name="Notification" value="org.apache.cordova.notification.Notification"/>
name="Accelerometer" value="org.apache.cordova.accelerometer.Accelerometer"/>
name="Geolocation" value="org.apache.cordova.geolocation.Geolocation"/>
name="File" value="org.apache.cordova.file.FileManager"/>
name="FileTransfer" value="org.apache.cordova.http.FileTransfer"/>
name="Contact" value="org.apache.cordova.pim.Contact"/>
name="MediaCapture" value="org.apache.cordova.media.MediaCapture"/>
name="Battery" value="org.apache.cordova.battery.Battery"/>