xcodecordovaios6childbrowser

Cordova 2.1 and ChildBrowser Works in Simulator but not on phone


I'm building an app using Xcode 4.5.1, Cordova/Phonegap 2.1 with the ChildBrowser plugin. I have the following jquery to open all external links using ChildBrowser.

$('a[href^="http"]').live('tap', function(e){
    e.preventDefault();
    var url = $(this).attr("href");
    window.plugins.childBrowser.showWebPage(url, { showNavigationBar: true, showLocationBar: true, showAddressBar: true });
});

In the IPhone 6.0 simulator this works exactly as I want. The childbrowser window pops up and the url is loaded. And the tool bar button displays at the bottom of the childbrowser window allowing you to close the childbrowser returning you to the app exactly where you left it.

The problem is when installed on an iphone running iOS 6, the url is loaded in the childbrowser window but there is no chrome around this window. There is no tool bar or "Done" button to close the childbrowser window. So the only way to get back to the app is to shut down the app and restart it. I've searched the web for anyone having this issue and I've found nothing so I'm assuming it's something I'm doing wrong since no one else seems to have had this problem before.

Any help would be greatly appreciated.


Solution

  • After searching the internet for clues and getting no response at all from the folks at community.phonegap.com. I happened across the answer to my problem here.

    The problem was the reference to the childbrowser.js file. While the filename itself is all lower case. The reference that I copied from the guide looked like:

    <script src="ChildBrowser.js"></script>
    

    By changing the reference to the lower case version

    <script src="childbrowser.js"></script>
    

    Everything worked perfectly in the phone and the simulator.