0
votes

I have a iOS custom phonegap plugin packaged as a iOS static library. When I try to include this library in any other phonegap project, I am getting the PHONEGAP error on my console:

ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml

As suggested, I am suspecting the config.xml is to be blamed. I wanted to know how/what is the right way of referencing an iOS plugin class (which is inside a static library) in the config.xml

Current implementation:

eg: 
<feature name="CustomPlugin">
    <param name="ios-package" value="CustomPlugin"/>
</feature>

where the static library included is libCustomPlugin.a(containing object ~ CustomPlugin.o) and the header is CustomPlugin.h

Thanks in advance

1

1 Answers

0
votes

For me on PhoneGap 2.7.0 I have a config.xml with something like:

<plugins>
    <plugin name="Accelerometer" value="CDVAccelerometer"/>
    <plugin name="Battery" value="CDVBattery"/>
    <plugin name="Camera" value="CDVCamera"/>
    <plugin name="Capture" value="CDVCapture"/>
    <plugin name="Compass" value="CDVLocation"/>
    <plugin name="Contacts" value="CDVContacts"/>
    <plugin name="Debug Console" value="CDVDebugConsole"/>
    <plugin name="Device" value="CDVDevice"/>
    <plugin name="Echo" value="CDVEcho"/>
    <plugin name="File" value="CDVFile"/>
    <plugin name="FileTransfer" value="CDVFileTransfer"/>
    <plugin name="Geolocation" value="CDVLocation"/>
    <plugin name="Logger" value="CDVLogger"/>
    <plugin name="Media" value="CDVSound"/>
    <plugin name="NetworkStatus" value="CDVConnection"/>
    <plugin name="Notification" value="CDVNotification"/>
    <plugin name="SplashScreen" value="CDVSplashScreen"/>
    <plugin name="InAppBrowser" value="CDVInAppBrowser"/>
</plugins>

Your project is complaining because the "Device" plugin can't be found - it is a standard PhoneGap (Cordova) plugin which will be required by your project. So not connected to any custom plugins.