Reputation: 1576
What is the difference between these plugin declarations?
I can't figure out why I have them declared in different ways, however, everything works fine in my project.
<gap:plugin name="org.apache.cordova.device"/>
<gap:plugin name="org.apache.cordova.device-motion"/>
<gap:plugin name="org.apache.cordova.device-orientation"/>
<gap:plugin name="org.apache.cordova.file"/>
<gap:plugin name="org.apache.cordova.file-transfer"/>
<gap:plugin name="org.apache.cordova.geolocation"/>
<gap:plugin name="org.apache.cordova.splashscreen"/>
<gap:plugin name="org.apache.cordova.vibration"/>
<plugin name="cordova-plugin-whitelist" version="1"/>
Also, I'm not sure why I have to add plugins using this command:
cordova plugin add [PLUGIN_ID]
And then keep these references in config.xml.
Thanks a lot!
Upvotes: 2
Views: 1040
Reputation: 2327
cordova plugin add PLUGIN_NAME
.cordova plugin save
in CMD.When you open your config.xml you will see that your installed plugins are specified there.
For example when I install the plugin 'cordova-plugin-camera' and I enter cordova plugin save
in the CMD then the result in the config.xml will be:
<plugin name="cordova-plugin-camera" spec="~1.2.0" />
<!-- ~ = get cordova-plugin-camera version 1.2.0 or higher if available -->
For example:
<gap:plugin name="cordova-plugin-camera" version="~1.2.0" />
Upvotes: 1