Andrew Fletcher published: 27 April 2022 1 minute read
Updating the Cordova plugins... there are two locations to manage the plugins
- config.xml
- package.json
I was finding some Cordova functionality was not coming through... through further investigation the two files above had conflicting data.
Review the data
package.json
"cordova-browser": "6.0.0",
"cordova-plugin-advanced-http": "3.3.1",
"cordova-plugin-android-permissions": "^1.1.3",
"cordova-plugin-device": "2.1.0",
"cordova-plugin-file": "^7.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^5.0.0",
"cordova-plugin-splashscreen": "6.0.1",
"cordova-plugin-statusbar": "3.0.0",
"cordova-plugin-whitelist": "1.3.5",config.xml
<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^2.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<plugin name="cordova-plugin-advanced-http" spec="2.0.1" />
<engine name="browser" spec="5.0.4" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
Syncronise data
Next step sync the data between the two files
<plugin name="cordova-plugin-whitelist" spec="1.3.5" />
<plugin name="cordova-plugin-device" spec="2.1.0" />
<plugin name="cordova-plugin-splashscreen" spec="6.0.1" />
<plugin name="cordova-plugin-ionic-webview" spec="^5.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
<plugin name="cordova-plugin-advanced-http" spec="3.3.1" />
<engine name="browser" spec="6.0.0" />
<plugin name="cordova-plugin-statusbar" spec="3.0.0" />
Test and check
Have the changes above fixed a few of the issues that were coming thorugh?