Package.json: Cordova plugin vs. Ionic Native plugin


I want to clean my package.json file and I saw that I always got 2 versions of a same plugin. I got the ionic version and the cordova version. For exemple :
“cordova-plugin-statusbar”: “2.2.1”,
"@ionic-native/status-bar": “3.4.2”

Should I keep both plugin to ensure that my application will work on both android/ios or can I just keep 1 of these ?


Yes, you want to keep both entries because these are totally different things. One is the Cordova plugin. The other is the code Ionic Native to talk to this Cordova plugin. You need both for your code to work.