I recently upgraded to Cordova 2.9.0 from 2.3.0. After following all the upgrade instructions, I was able to get the app to launch in the simulator. However, in Xcode I see the following errors:
ERROR: Plugin 'Device' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
-[CDVCommandQueue executePending] [Line 103] FAILED pluginJSON = ["Device1776032119","Device","getDeviceInfo",[]]
ERROR: Plugin 'NetworkStatus' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
-[CDVCommandQueue executePending] [Line 103] FAILED pluginJSON = ["NetworkStatus1776032120","NetworkStatus","getConnectionInfo",[]]
-[CDVCommandQueue executePending] [Line 103] FAILED pluginJSON = ["INVALID","Logger","logLevel",["LOG","deviceready has not fired after 5 seconds."]]
ERROR: Plugin 'Logger' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
-[CDVCommandQueue executePending] [Line 103] FAILED pluginJSON = ["INVALID","Logger","logLevel",["LOG","Channel not fired: onCordovaConnectionReady"]]
ERROR: Plugin 'Logger' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
-[CDVCommandQueue executePending] [Line 103] FAILED pluginJSON = ["INVALID","Logger","logLevel",["LOG","Channel not fired: onCordovaInfoReady"]]
This is my config.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<widget>
<feature name="Geolocation">
<param name="ios-package" value="CDVLocation" />
</feature>
<feature name="Device">
<param name="ios-package" value="CDVDevice" />
</feature>
<feature name="Accelerometer">
<param name="ios-package" value="CDVAccelerometer" />
</feature>
<feature name="Compass">
<param name="ios-package" value="CDVLocation" />
</feature>
<feature name="Media">
<param name="ios-package" value="CDVSound" />
</feature>
<feature name="Camera">
<param name="ios-package" value="CDVCamera" />
</feature>
<feature name="Contacts">
<param name="ios-package" value="CDVContacts" />
</feature>
<feature name="File">
<param name="ios-package" value="CDVFile" />
</feature>
<feature name="NetworkStatus">
<param name="ios-package" value="CDVConnection" />
</feature>
<feature name="Notification">
<param name="ios-package" value="CDVNotification" />
</feature>
<feature name="FileTransfer">
<param name="ios-package" value="CDVFileTransfer" />
</feature>
<feature name="Capture">
<param name="ios-package" value="CDVCapture" />
</feature>
<feature name="Battery">
<param name="ios-package" value="CDVBattery" />
</feature>
<feature name="SplashScreen">
<param name="ios-package" value="CDVSplashScreen" />
</feature>
<feature name="Echo">
<param name="ios-package" value="CDVEcho" />
</feature>
<feature name="Globalization">
<param name="ios-package" value="CDVGlobalization" />
</feature>
<feature name="InAppBrowser">
<param name="ios-package" value="CDVInAppBrowser" />
</feature>
<feature name="Logger">
<param name="ios-package" value="CDVLogger" />
</feature>
<feature name="LocalStorage">
<param name="ios-package" value="CDVLocalStorage" />
</feature>
<plugins>
</plugins>
<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="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<access origin="*.googleapis.com"/>
<access origin="*.gstatic.com"/>
<access origin="*.s3.amazonaws.com"/>
</widget>
For future searchers (like me!), I had a similar problem trying to add the console plugin to my project. The missing step for me after installing the plugin was to make sure the source files of the plugin (CDVlogger.m) 'target membership' settings included my application names.
Similar question with answer that worked for me:
remove ./plugins/ios.json to make sure the plugins are rebuilt.
Phonegap 3.0 IOS plugins not found
I had the same issue. I just downloaded the cordova 3.0 command line tool using node's package manager. I then used the tool from Terminal to create my project, add platforms to it, and build it like this.
cordova create myApp com.project.RobertW myApp
cd myApp
cordova platform add ios
cordova platform add android
cordova build
After this I saw those same errors in Xcode when I tried to run it in the simulator. It seems by default now PhoneGap does not include any plugins in the project so even if there in your config file they probably won't be in the plugins folder. You have to add them manually or via the command line tool. I used the command line tool because I thought it was easier like so.
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-network-information.git
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
cordova build
After doing this I ran myApp in the simulator again and everything worked fine. There are some good instructions on the command line tool here:
http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface
I would like to think if PhoneGap 3.0 needs Logger, Device, and Network Status that it would include those plugins automatically but in my case it did not. Hope this helps.
Edit: In the config.xml for iOS version in Xcode, you'll also need to make this change to get the Logger plugin to work correctly. The following is the default.
<feature name="Console">
<param name="ios-package" value="CDVLogger" />
</feature>
Change above to this
<feature name="Logger">
<param name="ios-package" value="CDVLogger" />
</feature>
Now all your console functions should work without throwing errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With