Skip to Content
Author's profile photo Daniel Van Leeuwen

Getting Started with Kapsel – Appendix E — Upgrading


Appendix E:  Upgrading

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.

  • Create a backup of the project being upgraded.
  • Determine the version of Cordova that the project was created with.
    C:\Kapsel_Projects\StorageDemo>cordova platform
    Installed platforms: android 3.5.1
    Available platforms: amazon-fireos, blackberry10, firefoxos, windows8, wp8
  • Determine the version of the Cordova CLI currently installed.
    C:\Kapsel_Projects\StorageDemo>cordova -v
  • Determine if there is a newer version of Cordova.
    C:\Kapsel_Projects\StorageDemo>npm info cordova
    npm http GET
    npm http 304
    { name: 'cordova',
      description: 'Cordova command line interface tool',
      'dist-tags': { latest: '3.1.0-0.2.0' },
       [ '0.0.1',
         '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',

  • If needed, upgrade the Cordova version.      Since the Kapsel plugins have been tested against a specific version of the Cordova it is recommended that an install of a specific version is performed.
    npm uninstall -g cordova
    npm install -g cordova@3.6.3-0.2.13
    cordova -v

    Note the version of node can also be checked.

    node -v

    The current version is listed and available at

  • Upgrade the project.
    cordova -d platform update android
    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.

    var CORDOVA_JS_BUILD_LABEL = '3.6.3';

    For additional details on upgrading see the Cordova project see Upgrading Android and Upgrading iOS.

  • Determine the plugins used in the project by examining the plugins folder (C:\Kapsel_Projects\StorageDemo\plugins) or by using the plugins cli command.
    C:\Kapsel_Projects\StorageDemo>cordova plugins 3.5.0 "CoreLibs" 3.5.0 "EncryptedStorage" 3.5.0 "Logon"
    org.apache.cordova.device 0.2.11 "Device"
    org.apache.cordova.inappbrowser 0.3.4-patched "InAppBrowser"
  • The versions of each plugin can also be determined by examining the version number in the plugin.xml. C:\Kapsel_Projects\StorageDemo\plugins\\plugin.xml)
    <?xml version="1.0" encoding="UTF-8"?>
    <plugin xmlns="" id="" version="3.4.0">
    <?xml version="1.0" encoding="UTF-8"?>
    <plugin xmlns="" id="org.apache.cordova.device" version="0.2.11">

  • Notice that the Kapsel plugins were created using 3.4.0.
    Download and run the installer to upgrade the SAP Mobile SDK to SP06 and SP05 for the server.  See Setup for additional details on where to download SP06 from.
  • Remove the old plugins.  Note that removing the encryptedstorage plugin should remove the corelibs plugin as it a dependent plugin.  A plugin’s dependencies are listed in its plugin.xml file.
    cordova plugin remove
    cordova plugins

    if needed

    cordova plugins remove
  • In SDK SP04 the way that local plugins are found was changed.  When creating a new project a plugin_search_path parameter is passed.  This generates a file named config.json.  If upgrading a project that was created in SP03 or earlier, manually create this file and include the location where Kapsel SDK is installed.
        "plugin_search_path": "C:/SAP/MobileSDK3/KapselSDK/plugins/"


        "plugin_search_path": "/Users/i826567/SAP/MobileSDK3/KapselSDK/plugins/"
  • Add the EncryptedStorage plugin.  Note that as of SP03 the EncryptedStorage plugin includes the Logon plugin.
    cordova -d plugin add
  • Examine the list of plugins in the project
    C:\Kapsel_Projects\StorageDemo>cordova plugins 3.6.3 "AuthProxy" 3.6.3 "CoreLibs" 3.6.3 "EncryptedStorage" 3.6.3 "Logon"
    org.apache.cordova.device 0.2.13 "Device"
    org.apache.cordova.inappbrowser 0.3.4-patched "InAppBrowser"
  • Verify the plugins are now updated by examining the list above.
    Note that the device plugin is being accessed from, so the latest version available of the plugin is added at the time the command is run.  To see the version history of the plugin, see its git hub page at
  • Prepare the project.
    cordova -d prepare
  • As a final step remember to upgrade the Kapsel CLI.
    C:\SAP\MobileSDK3\KapselSDK\cli>npm uninstall -g kapsel
    C:\SAP\MobileSDK3\KapselSDK\cli>npm install -g
  • The following links contain some information regarding the latest news on Cordova including new releases.
    Cordova News
    Cordova Blog
  • Note there are some known Cordova issues with uninstalling plugins.  CB-6140

Back to Getting Started With Kapsel

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Daniel Van Leeuwen
      Daniel Van Leeuwen
      Blog Post Author

      Updated for SMP 3.0 SP03

      Author's profile photo Daniel Van Leeuwen
      Daniel Van Leeuwen
      Blog Post Author

      Updated for SMP SDK 3.0 SP04

      Author's profile photo Daniel Van Leeuwen
      Daniel Van Leeuwen
      Blog Post Author

      Updated for SMP SDK 3.0 SP05

      Author's profile photo Daniel Van Leeuwen
      Daniel Van Leeuwen
      Blog Post Author

      Updated for SMP SDK SP06 and SP05 Server.

      Author's profile photo Estanislao Bulian
      Estanislao Bulian

      Hi Daniel,

        Excelent series of blogs. Where can we find the relation between versions of cordova and SMP that is updated directly from SAP?. I'm currently on latest versions of SDK SP8PL2 and Server SP7PL3.

      Author's profile photo Daniel Van Leeuwen
      Daniel Van Leeuwen
      Blog Post Author

      Sorry, I have not gotten around to updating this in a while.

      Three other locations to look at that have the details of the Cordova and SDK versions are

      Getting Started with Kapsel - Part 1



      Dan van Leeuwen

      Author's profile photo Estanislao Bulian
      Estanislao Bulian

      To keep up-to-date.

      SAP Mobile Platform SDK 3.0 SP07 npm install -g cordova@4.2.0

      SAP Mobile Platform SDK 3.0 SP08 npm install -g cordova@4.2.0