Upgrading Cordova BlackBerry

This document is for people who need to upgrade their Cordova versions from an older version to a current version of Cordova.

Upgrade to 2.5.0 from 2.4.0

Updating the PhoneGap download folder:

It is recommended that you download a fresh copy of the entire folder.

However, here are the new parts needed for the piecemeal update:

  1. Update the cordova.blackberry.js file in the ‘Phonegap-2.5.0/lib/blackberry/javascript’ folder
  2. Update the ‘ext’, ‘ext-air’, and ‘ext-qnx’ in the ‘Phonegap-2.5.0/lib/blackberry/framework’ folder
  3. Update the ‘build.xml’ file in the ‘Phonegap-2.5.0/lib/blackberry’ folder
  4. Update the the ‘Phonegap-2.5.0/lib/blackberry/bin’ folder
  5. Update the ‘VERSION’ file in the ‘Phonegap-2.5.0/lib/blackberry’ folder

Updating the example/ folder or migrating an existing project:

  1. Open your www/ folder, which contains your app.
  2. Remove and update the .jar file in the ext/ folder.
  3. Update the contents of the ext-air/ folder.
  4. Update the contents of the ext-qnx/ folder.
  5. Copy the new cordova-2.5.0.js into your project.
  6. Update your HTML to use the new cordova-2.5.0.js file.

Upgrade to 2.0.0 from 1.9.0

Updating just the www folder:

  1. Open your www/ folder, which contains your app.
  2. Remove and update the .jar file in the ext/ folder.
  3. Update the contents of the ext-air/ folder.
  4. Copy the new cordova-2.0.0.js into your project.
    • If playbook, then update the .js file in the playbook/ folder.
  5. Update your HTML to use the new cordova-2.0.0.js file.
  6. Update your www/plugins.xml file. Two plugins changed their namespace/service label. Change the old entries for the Capture and Contact plugins from:

     <plugin name="Capture" value="org.apache.cordova.media.MediaCapture"/>
     <plugin name="Contact" value="org.apache.cordova.pim.Contact"/>
    

    To:

     <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture"/>
     <plugin name="Contacts" value="org.apache.cordova.pim.Contact"/>
    

Updating the sample folder (ie, updating using the ant tools):

  1. Open the sample/lib/ folder.
  2. Update the .jar file in the cordova.1.9.0/ext/ folder.
  3. Update the contents of the cordova.1.9.0/ext-air/ folder.
  4. Update the .js file in the cordova.1.9.0/javascript/ folder.
  5. Open the sample/lib/ folder and rename the cordova.1.9.0/ folder to cordova.2.0.0/.
  6. Type ant blackberry build or ant playbook build to update the www/ folder with updated Cordova.
  7. Open the www/ folder and update your HTML to use the new cordova-2.0.0.js file.
  8. Open the www/ folder and update the plugins.xml file. Two plugins changed their namespace/service label. Change the old entries for the Capture and Contact plugins from:

      <plugin name="Capture" value="org.apache.cordova.media.MediaCapture"/>
      <plugin name="Contact" value="org.apache.cordova.pim.Contact"/>
    

    To:

      <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture"/>
      <plugin name="Contacts" value="org.apache.cordova.pim.Contact"/>
    
  • To upgrade to 1.8.0, please go from 1.7.0

Upgrade to 1.8.0 from 1.7.0

Updating just the www folder:

  1. Open your www/ folder, which contains your app.
  2. Remove and update the .jar file in the ext/ folder.
  3. Update the contents of the ext-air/ folder.
  4. Copy the new cordova-1.8.0.js into your project.
    • If playbook, then update the .js file in the playbook/ folder.
  5. Update your HTML to use the new cordova-1.8.0.js file.
  6. Update your www/plugins.xml file. Two plugins changed their namespace/service label. Change the old entries for the Capture and Contact plugins from:

     <plugin name="Capture" value="org.apache.cordova.media.MediaCapture"/>
     <plugin name="Contact" value="org.apache.cordova.pim.Contact"/>
    

    To:

     <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture"/>
     <plugin name="Contacts" value="org.apache.cordova.pim.Contact"/>
    

Updating the sample folder (ie, updating using the ant tools):

  1. Open the sample/lib/ folder.
  2. Update the .jar file in the cordova.1.7.0/ext/ folder.
  3. Update the contents of the cordova.1.7.0/ext-air/ folder.
  4. Update the .js file in the cordova.1.7.0/javascript/ folder.
  5. Open the sample/lib/ folder and rename the cordova.1.7.0/ folder to cordova.1.8.0/.
  6. Type ant blackberry build or ant playbook build to update the www/ folder with updated Cordova.
  7. Open the www/ folder and update your HTML to use the new cordova-1.8.0.js file.
  8. Open the www/ folder and update the plugins.xml file. Two plugins changed their namespace/service label. Change the old entries for the Capture and Contact plugins from:

      <plugin name="Capture" value="org.apache.cordova.media.MediaCapture"/>
      <plugin name="Contact" value="org.apache.cordova.pim.Contact"/>
    

    To:

      <plugin name="Capture" value="org.apache.cordova.capture.MediaCapture"/>
      <plugin name="Contacts" value="org.apache.cordova.pim.Contact"/>