m1crdy m1crdy - 1 year ago 97
iOS Question

Phonegap 3.0 IOS plugins not found

I´m getting this error in XCode:

2013-08-23 14:36:18.284 Tell The DJ[14955:c07] ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2013-08-23 14:36:18.284 Tell The DJ[14955:c07] -[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [

2013-08-23 14:36:18.285 Tell The DJ[14955:c07] CDVPlugin class CDVConnection (pluginName: NetworkStatus) does not exist.
2013-08-23 14:36:18.285 Tell The DJ[14955:c07] ERROR: Plugin 'NetworkStatus' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2013-08-23 14:36:18.285 Tell The DJ[14955:c07] -[CDVCommandQueue executePending] [Line 116] FAILED pluginJSON = [


I installed Phonegap 3.0 with the Command Line Interface and paste my www files into the project folders. The app works fine but when i come to native functions like device ID, camera, network connections it fails and gets me this error. But I think my config.xml is right?

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.helloCordova" version="2.0.0" xmlns="http://www.w3.org/ns/widgets">
<name>Hello Cordova</name>
A sample Apache Cordova application that responds to the deviceready event.
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
<content src="index.html" />
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage" />
<access origin="http://dev.tellthedj.de" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="UIWebViewBounce" value="true" />
<preference name="TopActivityIndicator" value="gray" />
<preference name="EnableLocation" value="false" />
<preference name="EnableViewportScale" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="OpenAllWhitelistURLsInWebView" value="false" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="orientation" value="portrait" />
<preference name="webviewbounce" value="false" />
<preference name="prerendered-icon" value="true" />
<preference name="phonegap-version" value="3.0.0" />
<preference name="fullscreen" value="false" />
<preference name="stay-in-webview" value="false" />
<preference name="android-minSdkVersion" value="7" />
<preference name="android-installLocation" value="internalOnly" />
<preference name="target-device" value="universal" />
<preference name="autohide-splashscreen" value="true" />
<preference name="load-url-timeout" value="60000" />
<preference name="show-splashscreen-spinner" value="true" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="allow-inline-media-playback" value="false" />
<preference name="launch-mode" value="standard" />
<feature name="Media">
<param name="ios-package" value="CDVSound" />
<feature name="Camera">
<param name="ios-package" value="CDVCamera" />
<feature name="Console">
<param name="ios-package" value="CDVLogger" />
<feature name="Device">
<param name="ios-package" value="CDVDevice" />
<feature name="Notification">
<param name="ios-package" value="CDVNotification" />
<feature name="File">
<param name="ios-package" value="CDVFile" />
<feature name="FileTransfer">
<param name="ios-package" value="CDVFileTransfer" />
<feature name="Geolocation">
<param name="ios-package" value="CDVLocation" />
<feature name="Capture">
<param name="ios-package" value="CDVCapture" />
<feature name="NetworkStatus">
<param name="ios-package" value="CDVConnection" />
<feature name="SplashScreen">
<param name="ios-package" value="CDVSplashScreen" />
<plugin name="Device" value="CDVDevice" />

Answer Source

I was using PhoneGap 3.0/3.1 and was removing the local build folder before rebuilding (since I had to copy icons and stuff in a secondary build script). This broke my plugins and produced this same error message.

In the end I found I had to remove ./plugins/ios.json when removing ./platforms/ios to make sure the plugins were rebuilt.