htmliosxcodecordovachildbrowser

PhoneGap saying ChildBrowser Plugin doesn't exist


I'm developing an app for iPhone using Xcode and PhoneGap and HTML, and ChildBrowser. I'm trying to display a PDF that is being retrieved from Dropbox (the site has been added to the External Array list in Cordova.plist) but the error Plugin 'ChildBrowserCommand' not found, or is not a CDVPlugin. Check your plugin mapping in Cordova.plist comes up in the console and i don't understand what's wrong. in Cordova.plist, i added to the Plugin Dictionary;

enter image description here

The JavaScript is;

childbrowser = ChildBrowser.install();

function viewOnline(site) {
  cordova.exec("ChildBrowserCommand.showWebPage", encodeURI(site));
}

and the HTML is;

<button onclick="viewOnline('http://dl.dropbox.com/u/97184921/Internship%20Stuff/Holidays.pdf');">View Online</button></li>

I'm fairly new to ChildBrowser and don't really understand what's wrong; how do i fix the code?

EDIT

this is the full error that comes up in the console if it helps;

2013-03-11 16:05:00.327 TestApp1[62039:15b03] ERROR: Plugin 'ChildBrowser' not found, or is not a CDVPlugin. Check your plugin mapping in Cordova.plist.

2013-03-11 16:05:00.328 TestApp1[62039:15b03] -[CDVCommandQueue executePending] [Line 102] FAILED pluginJSON = [null,"ChildBrowser","showWebPage",["http://dl.dropbox.com/u/97184921/Internship%2520Stuff/Holidays.pdf"]]


Solution

  • I answered it myself - you need to make sure all ChildBrowser files are in the Plugins folder in Xcode (can be seen to the left of the screen underneath the index.html files etc - may be empty at first