Plugins with Ionic + PhoneGap Build doesn't work

We are using Ionic to make our mobile application. To build the application we want to use the PhoneGap Build service. Now we want to use some plugins like the Camera (or Network information), and this works fine when we build the application locally or using the IonicView app to display the application, but not when we build it with PGB.

We already copied the config.xml file to the www/ folder, added

xmlns:gap="http://phonegap.com/ns/1.0" 

to the <widget> and added the plugin:

<gap:plugin name="org.apache.cordova.camera"/>

This didn't work. Also tried an other:

<gap:plugin name="Camera" value="org.apache.cordova.camera" />

But then PGB says: unsupported plugin: Camera

Also tried with <feature> tags:

<feature name="http://api.phonegap.com/1.0/camera" />
<feature name="http://api.phonegap.com/1.0/file" />

Or even in combination with:

<feature name="Camera">
    <param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
</feature>

(Just to test it on an Android device). But nothing worked... we also have a reference to the cordova.js file in our index.html file.

The problem is (we think) that Ionic uses Cordova and not PhoneGap, so we can't use the PhoneGap Build service properly. Is there any workaround or solution to get the plugins working with Ionic(cordova) + PhoneGap Build?

install these plugins via command. It automatically updates the config file.

cordova add Plugin org.apache.cordova.camera worked for me.

config.XML

<preference name="loglevel" value="DEBUG" />
<feature name="Keyboard">
    <param name="android-package" value="com.ionic.keyboard.IonicKeyboard" />
    <param name="onload" value="true" />
</feature>
<feature name="Device">
    <param name="android-package" value="org.apache.cordova.device.Device" />
</feature>
<feature name="Camera">
    <param name="android-package" value="org.apache.cordova.camera.CameraLauncher" />
</feature>
<feature name="File">
    <param name="android-package" value="org.apache.cordova.file.FileUtils" />
    <param name="onload" value="true" />
</feature>
<feature name="FileTransfer">
    <param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" />
</feature>

For those who are also struggeling with this, I managed to fix this by refering to the Git repository from my project instead of uploading a ZIP file to PGB. Now everything works as supposed!

Weird fix...