I'm trying to build my first Cordova app and I can't get a plugin to work.
My app was built using the Cordova command line interface, so I've added the Camera plugin this way:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
My config.xml looks like this:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.dev.myapp" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>My App</name>
<description>
A sample Apache Cordova application
</description>
<author email="[email protected]" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<feature name="Camera">
<param name="ios-package" value="CDVCamera" />
</feature>
</widget>
I've run cordova build
and everything went fine, but when I build the project in Xcode it tells me first the CDVCamera.h, CDVCamera.m files
are missing. Isn't the command line interface supposed to place those files correctly when I run cordova plugin add
in the first place ?
Also even if I copy the files manually in my project, the project runs but when I call the Camera functions it throws the following error:
ERROR: Plugin 'Camera' not found, or is not a CDVPlugin
I know I'm new to this, but I can't figure out what am i doing wrong ?