Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mapping error with ChildBrowser and PhoneGap 1.5.0 (Cordova)

When I try to call:

window.plugins.childBrowser.showWebPage

I get this error in the console window:

2012-03-13 16:14:58.036 CordovaHybridDemo[874:707] ERROR: Plugin 'ChildBrowserCommand' not found, or is not a CDVPlugin. Check your plugin mapping in Cordova.plist.

I added an entry in Cordova.plist with a key of ChildBrowserCommand and a value of ChildBrowserCommand. That worked in PhoneGap 1.4.1 but has that changed for Cordova?

like image 435
Bob Avatar asked Mar 14 '12 19:03

Bob


Video Answer


1 Answers

Cordova changing their plugin architecture. Including keywords and files, classes.

Check your ChildBrowserCommand.h file

@interface ChildBrowserCommand : CDVPlugin <ChildBrowserDelegate>  

For this. If it is not CDVPlugin you have not updated your plugin files successfully. Analogy might be apply for Android.

Check the updated js file for the plugin also.

var cordovaRef = window.PhoneGap || window.Cordova || window.cordova; // old to new fallbacks

Here they make plugins usable for new cordova.

Refer this plugin upgration guide by Cordova https://github.com/phonegap/phonegap-plugins/blob/master/iOS/README.md

like image 185
MadNik Avatar answered Nov 15 '22 00:11

MadNik