license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
This guide shows how to modify BlackBerry projects to upgrade from older versions of Cordova. Most of these instructions apply to projects created with an older set of command-line tools that precede the cordova
CLI utility. See The Cordova Command-line Interface for information how to update the version of the CLI.
BlackBerry 10:
BlackBerry 10:
BlackBerry 10 uses the new CLI tooling and manages core APIs as plugins. The instructions migrate your project to a new project, rather than updating an existing project, due to the complexity of updating an old project. Also note that the cordova js script file is now called ‘cordova.js’ and no longer contains a version string.
BlackBerryOS/Playbook:
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:
Updating the example/ folder or migrating an existing project:
www/
folder, which contains your app.ext/
folder.ext-air/
folder.ext-qnx/
folder.cordova-2.6.0.js
into your project.cordova-2.6.0.js
file.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:
Updating the example/ folder or migrating an existing project:
www/
folder, which contains your app.ext/
folder.ext-air/
folder.ext-qnx/
folder.cordova-2.5.0.js
into your project.cordova-2.5.0.js
file.Updating just the www
folder:
www/
folder, which contains your app.ext/
folder.ext-air/
folder.cordova-2.4.0.js
into your project.playbook/
folder.qnx/
folder.cordova-2.4.0.js
file.Updating the sample folder (ie, updating using the ant tools):
sample/lib/
folder.cordova.2.3.0/ext/
folder.cordova.2.3.0/ext-air/
folder.cordova.2.3.0/ext-qnx/
folder.cordova.2.3.0/javascript/
folder.sample/lib/
folder and rename the cordova.2.3.0/
folder to cordova.2.4.0/
.ant blackberry build
or ant playbook build
to update the www/
folder with updated Cordova.www/
folder and update your HTML to use the new cordova-2.4.0.js
fileUpdating just the www
folder:
www/
folder, which contains your app.ext/
folder.ext-air/
folder.cordova-2.3.0.js
into your project.playbook/
folder.qnx/
folder.cordova-2.3.0.js
file.Updating the sample folder (ie, updating using the ant tools):
sample/lib/
folder.cordova.2.2.0/ext/
folder.cordova.2.2.0/ext-air/
folder.cordova.2.2.0/ext-qnx/
folder.cordova.2.2.0/javascript/
folder.sample/lib/
folder and rename the cordova.2.2.0/
folder to cordova.2.3.0/
.ant blackberry build
or ant playbook build
to update the www/
folder with updated Cordova.www/
folder and update your HTML to use the new cordova-2.3.0.js
fileUpdating just the www folder:
www/
folder, which contains your app.ext/
folder.ext-air/
folder.cordova-2.2.0.js
into your project.playbook/
folder.qnx/
folder.cordova-2.2.0.js
file.Updating the sample folder (ie, updating using the ant tools):
sample/lib/
folder.cordova.2.1.0/ext/
folder.cordova.2.1.0/ext-air/
folder.cordova.2.1.0/ext-qnx/
folder.cordova.2.1.0/javascript/
folder.sample/lib/
folder and rename the cordova.2.1.0/
folder to cordova.2.2.0/
.ant blackberry build
or ant playbook build
to update the www/
folder with updated Cordova.www/
folder and update your HTML to use the new cordova-2.2.0.js
file.Updating just the www
folder:
www/
folder, which contains your app.ext/
folder.ext-air/
folder.cordova-2.1.0.js
into your project.playbook/
folder.cordova-2.1.0.js
file.Updating the sample folder (ie, updating using the ant tools):
sample/lib/
folder.cordova.2.0.0/ext/
folder.cordova.2.0.0/ext-air/
folder.cordova.2.0.0/javascript/
folder.sample/lib/
folder and rename the cordova.2.0.0/
folder to cordova.2.1.0/
.ant blackberry build
or ant playbook build
to update the www/
folder with updated Cordova.www/
folder and update your HTML to use the new cordova-2.1.0.js
file.Updating just the www
folder:
Open your www/
folder, which contains your app.
Remove and update the .jar file in the ext/
folder.
Update the contents of the ext-air/
folder.
Copy the new cordova-2.0.0.js
into your project.
playbook/
folder.Update your HTML to use the new cordova-2.0.0.js
file.
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):
Open the sample/lib/
folder.
Update the .jar file in the cordova.1.9.0/ext/
folder.
Update the contents of the cordova.1.9.0/ext-air/
folder.
Update the .js file in the cordova.1.9.0/javascript/
folder.
Open the sample/lib/
folder and rename the cordova.1.9.0/
folder to cordova.2.0.0/
.
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-2.0.0.js
file.
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"/>
Updating just the www
folder:
Open your www/
folder, which contains your app.
Remove and update the .jar file in the ext/
folder.
Update the contents of the ext-air/
folder.
Copy the new cordova-1.8.0.js
into your project.
playbook/
folder.Update your HTML to use the new cordova-1.8.0.js
file.
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):
Open the sample/lib/
folder.
Update the .jar file in the cordova.1.7.0/ext/
folder.
Update the contents of the cordova.1.7.0/ext-air/
folder.
Update the .js file in the cordova.1.7.0/javascript/
folder.
Open the sample/lib/
folder and rename the cordova.1.7.0/
folder to cordova.1.8.0/
.
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.8.0.js
file.
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"/>