Release Bulletin 2.3 SP09

Upgrading Hybrid Apps to use the Latest Version of Cordova

Upgrade Hybrid Apps to use the latest version of Cordova.

Context

Depending on the Hybrid App development approach, there are two ways of upgrading existing Hybrid Apps to use the latest version of Cordova:
  1. For existing Hybrid Apps built by the SAP Mobile SDK, rebuild them with the initial version (or later) of the SAP Mobile SDK that uses the upgraded version of Cordova. See the table below.
  2. For existing Hybrid Apps written manually, follow the instructions in this guide.
This table identifies the initial SAP Mobile SDK version and corresponding upgraded Cordova version inclued in the Hybrid Web Container:

Platform

Initial SAP Mobile SDK Version

Upgraded Cordova Version

iOS

2.3 SP06

3.7.0

Android

2.3 SP05

3.6.4

BlackBerry

2.3 SP06

2.9.1

Procedure

  1. Upgrading Android Hybrid Apps to use Cordova version 3.6.4:
    1. Retrieve all Cordova 3.6.4 JS files for the Android platform using the Cordova command-line interface. See https://cordova.apache.org/docs/en/4.0.0/guide_cli_index.md.html Information published on non-SAP site for details.
    2. Replace the previous Cordova JS file used in the Hybrid App for Android platform and update the html or JS file to load the new Cordova JS file. For example:
      Change the previous code snippet for loading Cordova JS:
      <script src="js/Andorid/Cordova-2.0.0.javascript"></script>
      To this code to load load the new Cordova JS file for the Android platform:
      <script src="js/Andorid/cordova.js "></script>
    3. Replace the previous Cordova JS file path with new file path and add all related Cordova JS files’ path in the manifest.xml of the Hybrid App.
  2. Upgrading iOS Hybrid Apps to use Cordova version 3.7.0:
    1. Retrieve all Cordova 3.7.0 JS files for the iOS platform using the Cordova command-line interface. See https://cordova.apache.org/docs/en/4.0.0/guide_cli_index.md.html Information published on non-SAP site for details.
    2. Replace the previous Cordova JS file used in the Hybrid App for iOS platform and update the html or JS file to load the new Cordova JS file. For example:
      Change the previous code snippet for loading Cordova JS:
      <script src="js/IOS/Cordova-2.0.0.javascript"></script>
      To this code to load load the new Cordova JS file for the iOS platform:
      <script src="js/IOS/cordova.js "></script>  
    3. Replace the previous Cordova JS file path with new file path and add all related Cordova JS files’ path in the manifest.xml of the Hybrid App.
  3. Upgrading BlackBerry Hybrid Apps to use Cordova version 2.9.1:
    1. Dowload phonegap version 2.9.1 from http://phonegap.com Information published on non-SAP site.
    2. Unzip the phonegap2.9.1 ZIP file to get the cordova-2.9.1.js file. Replace the previous Cordova JS file used in Hybrid App for Blackberry and update the HTML or JS file to load the new Cordova JS. For example:
      Change the previous code snippet for loading Cordova JS:
      <script src="js/blackberry/Cordova-2.0.0.javascript"></script> 
      To this code to load load the new Cordova JS file for the BlackBerry platform:
      <script src="js/ blackberry / cordova-2.9.1.js "></script>   
    3. Replace the previous Cordova JS file path with new file path in the manifest.xml of the Hybrid App.