Introducing Cordova 11 support in Monaca

takuya
The Web Tub
Published in
2 min readMar 28, 2022

Starting this week, Monaca has started supporting Cordova 11.
Also, newly created projects will be created for Cordova 11.

The versions of Android and iOS provided by Monaca on Cordova 11 are:

Android updates

  • Cordova Android Platform: updated to “10.1.1” (API level 30)
  • Gradle version: updated to “7.1.1”

iOS updates

  • Cordova iOS Platform: updated to “6.2.0”
  • Xcode: “13.0”

How to upgrade the project

You can upgrade your project to Cordova 11 by following the steps below.

  1. Open the target project
  2. Click “Settings” in the header menu
  3. Click Manage Cordova Plugins
  4. Click “Upgrade to 11.0.0” in the figure below

Android Platform 10

In Cordova 11, projects use the Android platform 10 or later. Android platform 10 start to support WebViewAssetLoader. Therefore, the default scheme for accessing resources has been changed from the “file://” scheme to the “https://” scheme.

If your Monaca project is configured for Android platform 9 or lower, please make sure to check your application using Android platform 10 in advance.

Network Information Plugin

The “cordova-plugin-network-information” is now v3.0.0 in Cordova11.
In version 3, the reference to “navigator.network.connection,” which was available until version 2 series, has been changed to “navigator.connection” as follows.

// version2
navigator.network.connection

// version3
navigator.connection

Project Downgrade

Cordova11 Upgraded projects cannot be downgraded to a previous version.
A backup project of the previous version will be created automatically at the time of upgrade, so please use that.

Warning in Monaca Debugger

The “Monaca Debugger” for Cordova 11 is version 11.0.0 or later.

If the Cordova version installed in the debugger and the Cordova version of the project is different, the application may not work properly. In that case, please use “Custom Build Debugger”.

For information on how to get the custom build debugger, please refer to the following document.

Android Custom Monaca Debugger
iOS Custom Monaca Debugger

--

--