An Apache Cordova Library Update Is Coming Up: What You Should Know

1680

In the second half of December (actual date will be published later), we are going to update the Apache Cordova library version in new Appery.io apps. When you create a new Appery.io app (jQuery Mobile, Ionic or Bootstrap), your app will automaticaly include Apache Cordova version 5.2.2 for Android and version 4.3.0 for iOS. Existing apps will not be impacted as we are going to create a new Library version for this Cordova version inside the App Builder. (Only new apps will be based on this version.)

The App Builder will have the following new Library versions:

  • jQuery Mobile app - Library version 4.0
  • Ionic or Bootstrap app - Library version 1.2

List of Cordova Plug-ins

The plug-ins currently available will also be available in the new version, except for changes described in Plug-in and API Changes section.

  • cordova-plugin-compat (1.1.0)
  • phonegap-plugin-barcodescanner (6.0.2)
  • cordova-plugin-battery-status (1.2.0)
  • cordova-plugin-camera ( 2.3.0)
  • cordova-plugin-contacts (2.2.0)
  • cordova-plugin-device-motion (1.2.2)
  • cordova-plugin-device-orientation (1.0.3)
  • cordova-plugin-geolocation( 2.4.0)
  • cordova-plugin-network-information (1.3.0)
  • cordova-plugin-splashscreen (4.0.0)
  • cordova-plugin-vibration (2.1.2)
  • phonegap-plugin-push (1.8.4)
  • cordova-plugin-inappbrowser (1.5.0)
  • cordova-plugin-media (2.4.0)
  • cordova-plugin-media-capture (1.4.0)
  • cordova-plugin-dialogs (Notifications) (1.3.0)
  • cordova-plugin-file (4.3.0)
  • cordova-plugin-file-transfer (1.6.0 )
  • cordova-plugin-globalization (1.0.4)
  • google-analytics-plugin (1.6.0)
  • cordova-plugin-device(1.1.3)

Plug-in and API Changes

There are two plug-ins which will be impacted by this change: Google Analytics and Device.

The Google Analytics Plug-in

The Google Analytics plug-in (com.adobe.plugins.GAPlugin) is not longer available and will be replaced with a new google-analytics-plugin plug-in. If your app uses the old Google Analytics plug-in and you update the Tester app, the plug-in won’t work properly.

Device Plug-in

The Device plug-in (org.apache.cordova.device) removes one property and adds three new properties:

Old propertiesNew properties
device.name
device.cordovadevice.cordova
device.platformdevice.platform
device.uuiddevice.uuid
device.versiondevice.version
device.model
device.manufacturer
device.isVirtual
device.serial

If you update the Appery.io Tester app and your app uses device.name property, this code will not work as the property is no longer available in the new Cordova version.

Appery.io Tester App Update

The Appery.io Tester app (iOS and Android) will be udpated with the latest Cordova version. If your existing app doesn’t use the plug-ins described in the Plug-in and API Changes section, then you should be able to use the new Tester app with your existing app (even if your app is based on an older Cordova version).

If your app does use the two plug-ins mentioned in Plug-in and API Changes section, then you need to update your app to the latest Library version (4.0 for jQuery Mobile, 1.2 for Ionic/Bootstrap), which has the new Cordova version. It’s important you test the app to ensure it works properly before publishing any changes.

You can also not update the Tester app and continue using the older Tester version with your existing app.

How Do I Update My Existing App?

If you want to update your existing app (created before the update) to use the latest Cordova version, go to Project > External resources and select the latest Library version (4.0 for jQuery Mobile app, 1.2 for Ionic/Bootstrap app). Then, click Apply. It’s important you test the app to ensure it works properly before publishing any changes.

If your apps uses the Google Analytics plug-in, then you will need to update it (see previous section). You will also need to update your code if your app uses the removed Device API property (device.name).