0

I am using Cordova 1.8.1 in xcode 4.3.3 and trying to add the ChildBrowser Plugin to my phonegap app.The ChildBrowser plugin I’m using is here which I think is the latest version of ChildBrowser and I follow the tutorial here to make sure it works on iOS Simulator 5.1,but can not open a link.

Here's my example index.html code....

<script type="text/javascript" charset="utf-8" src="childbrowser.js"></script>
<script type="text/javascript">
var childbrowser;

function onBodyLoad() {
  document.addEventListener("deviceready", onDeviceReady, false);

}

function onDeviceReady() {
  navigator.notification.alert("Cordova is working");
}

function onLinkClick() {
    window.plugins.childBrowser.onLocationChange = function(loc){ alert("In index.html new loc = " + loc); };
    window.plugins.childBrowser.onClose = function(){alert("In index.html child browser closed");};
    window.plugins.childBrowser.onOpenExternal = function(){alert("In index.html onOpenExternal");};        

    window.plugins.childBrowser.showWebPage('http://www.google.com',
                                    { showLocationBar: true });
    console.log(window.plugins.childBrowser);

}
</script>

Does anyone have any ideas how I can get the ChildBrowser up and running?

Any help is greatly appreciated,thanks....

lucky520aki
  • 128
  • 1
  • 7

2 Answers2

0

I have a sample application working with childbrowser at this location with the steps to make it work in any application.

ios-child-browser

For more detail check this post - Childbrowser with Cordova 1.7 iPhone issue

Community
  • 1
  • 1
dhaval
  • 7,611
  • 3
  • 29
  • 38
  • Thx,that's quite helpful.the sample application works and now I'm trying to figure out What's wrong with me on Installing the ChildBrowser Plugin and I'm sorry for that I can't vote your anser up,because I don't have enough reputation to do that.Anyway thanks a lot... – lucky520aki Jun 23 '12 at 17:25
0

I've figured out that most of my mistakes were based on those old blog posts, so I wrote a blog post about how to Installing the ChildBrowser for iOS/xcode with PhoneGap/Cordova 1.8.1 and 1.9.0 step by step.

check this post -- Installing the ChildBrowser for iOS/xcode with PhoneGap/Cordova 1.8.1 and 1.9.0


hopefully this helps someone.

lucky520aki
  • 128
  • 1
  • 7