Search code examples
ioscordovaphonegap-pluginsinappbrowser

Showing "Done" button in IOS InAppBrowser with Phonegap


I'm using Phonegap 3.3 to develop an iOS app and trying to get the InAppBrowser working with a "Done" button so the user can return to the app once they're done on the external page. The link looks like this:

<a onclick="window.open('http://someurl.com', '_blank', 'location=yes');">http://someurl.com</a>

I ran phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git to add the plugin. The browser itself seems to be working, but I can't get the location toolbar to show up, so there's no way to exit once it's open. Any help would be much appreciated!


Solution

  • The problem ended up being that somehow the line to include phonegap.js had been removed from index.html. Adding <script type="text/javascript" src="phonegap.js"></script> solved the problem.