The contents of the www folder such as the HTML, JavaScript, CSS and image files that make up a hybrid app can be easily updated via the AppUpdate plugin. When it is time to upgrade the version of Cordova that the app was built with or the Kapsel plugins, the following instructions may be helpful. The versions of Cordova that must be used with a given version of Kapsel are listed below.
Cordova 3.0.6/3.0.9 -> SMP SDK 3.0
Cordova 3.1.0-0.2.0 -> SMP SDK 3.0 SP01
Cordova 3.3.1-0.1.2 -> SMP SDK 3.0 SP02
Cordova 3.4.0-0.1.3 -> SMP SDK 3.0 SP03
Cordova 3.4.1-0.1.0 -> SMP SDK 3.0 SP04
Cordova 3.5.0-0.2.7 -> SMP SDK 3.0 SP05
Cordova 3.6.3-0.2.13 -> SMP SDK 3.0 SP06
The following steps demonstrate how to do an upgrade using the StorageDemo project. It will be upgraded from Cordova 3.5.0-0.2.7 to Cordova 3.6.3-0.2.13 and from SMP 3.0 SDK SP05 to SMP 3.0 SDK SP06 PL01.
Note, an alternative (and perhaps easier) approach to upgrading a project is to create a new project and then copy the HTML assets to the new project.
C:\Kapsel_Projects\StorageDemo>cordova platform
Installed platforms: android 3.5.1
Available platforms: amazon-fireos, blackberry10, firefoxos, windows8, wp8
C:\Kapsel_Projects\StorageDemo>cordova -v
3.5.0-0.2.7
C:\Kapsel_Projects\StorageDemo>npm info cordova
npm http GET https://registry.npmjs.org/cordova
npm http 304 https://registry.npmjs.org/cordova
{ name: 'cordova',
description: 'Cordova command line interface tool',
'dist-tags': { latest: '3.1.0-0.2.0' },
versions:
[ '0.0.1',
'0.0.2',
...
'3.0.9': '2013-09-05T19:30:52.643Z',
...
'3.1.0-0.2.0': '2013-10-29T18:38:39.703Z',
...
'3.3.1-0.1.2': '2013-12-19T19:35:54.693Z',
...
'3.4.1-0.1.0': '2014-04-09T22:09:03.857Z',
...
'3.5.0-0.2.7': '2014-07-08T17:55:34.125Z',
...
'3.6.3-0.2.13': '2014-09-18T20:37:08.180Z',
npm uninstall -g cordova
npm install -g cordova@3.6.3-0.2.13
cordova -v
3.6.3-0.2.13
Note the version of node can also be checked. node -v
v0.10.26
The current version is listed and available at http://nodejs.org.cordova -d platform update android
or
cordova -d platform update ios
C:\Kapsel_Projects\StorageDemo>cordova platform
Installed platforms: android 3.6.3
Another way to see the version of a project is to examine the following file.C:\Kapsel_Projects\StorageDemo\platforms\android\assets\www\cordova.js
var CORDOVA_JS_BUILD_LABEL = '3.6.3';
For additional details on upgrading see the Cordova project see Upgrading Android and Upgrading iOS.C:\Kapsel_Projects\StorageDemo>cordova plugins
com.sap.mp.cordova.plugins.corelibs 3.5.0 "CoreLibs"
com.sap.mp.cordova.plugins.encryptedstorage 3.5.0 "EncryptedStorage"
com.sap.mp.cordova.plugins.logon 3.5.0 "Logon"
org.apache.cordova.device 0.2.11 "Device"
org.apache.cordova.inappbrowser 0.3.4-patched "InAppBrowser"
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="com.sap.mp.cordova.plugins.encryptedstorage" version="3.4.0">
<name>EncryptedStorage</name>
...
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" id="org.apache.cordova.device" version="0.2.11">
<name>Device</name>
...
cordova plugin remove com.sap.mp.cordova.plugins.encryptedstorage
cordova plugins
if neededcordova plugins remove com.sap.mp.cordova.plugins.authproxy
C:\Kapsel_Projects\StorageDemo\.cordova\config.json
{
"plugin_search_path": "C:/SAP/MobileSDK3/KapselSDK/plugins/"
}
or~/Documents/Kapsel_Projects/StorageDemo/.cordova/config.json
{
"plugin_search_path": "/Users/i826567/SAP/MobileSDK3/KapselSDK/plugins/"
}
cordova -d plugin add com.sap.mp.cordova.plugins.encryptedstorage
C:\Kapsel_Projects\StorageDemo>cordova plugins
com.sap.mp.cordova.plugins.authproxy 3.6.3 "AuthProxy"
com.sap.mp.cordova.plugins.corelibs 3.6.3 "CoreLibs"
com.sap.mp.cordova.plugins.encryptedstorage 3.6.3 "EncryptedStorage"
com.sap.mp.cordova.plugins.logon 3.6.3 "Logon"
org.apache.cordova.device 0.2.13 "Device"
org.apache.cordova.inappbrowser 0.3.4-patched "InAppBrowser"
cordova -d prepare
C:\SAP\MobileSDK3\KapselSDK\cli>npm uninstall -g kapsel
C:\SAP\MobileSDK3\KapselSDK\cli>npm install -g
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
38 | |
19 | |
13 | |
13 | |
11 | |
10 | |
10 | |
10 | |
8 | |
8 |