1

I'm trying to use the Childbrowser plugin in Phonegap Build. I have a few problems:

  1. For iOS, I can only get it to work using PG2.0. Switching to PG2.1 makes it defunct.
  2. For Android, the same code that worked for iOS and PG2.0 does not work at all.

From config.xml:

<preference name="phonegap-version" value="2.0.0" />
<gap:plugin name="ChildBrowser" /> <!-- latest release -->

I have used the Javascript API as described in https://github.com/alunny/ChildBrowser/blob/master/README.md

Ref: https://build.phonegap.com/docs/plugins

Any ideas or suggestions?

Per Quested Aronsson
  • 11,380
  • 8
  • 54
  • 76

2 Answers2

1

I think you may be looking at the wrong version of the child browser plugin - phonegap build is more likely using https://github.com/phonegap/phonegap-plugins/tree/master/iOS/ChildBrowser

Tom Clarkson
  • 16,074
  • 2
  • 43
  • 51
  • You might be right, but I have used the plugin version which is referenced in Phonegap Build's own documentation. See https://build.phonegap.com/docs/plugins, and scroll down to Childbrowser. – Per Quested Aronsson Nov 27 '12 at 11:04
  • If that is the repo being used, what you are seeing would be consistent with running an older version of the code - the most recent changes there seem to be around adding support for 2.1 – Tom Clarkson Nov 27 '12 at 11:21
  • Interesting. It says in their docs that using in config.xml should automatically provide the latest plugin version in PG Build. Perhaps it doesn't. Worth a try. – Per Quested Aronsson Nov 27 '12 at 11:53
  • It depends how you define the version - plugin.xml was last edited 4 months ago, so the current version 3.0.4 could refer to either that or the current master branch which includes the more recent 2.1 support changes. – Tom Clarkson Nov 27 '12 at 12:04
  • Thanks! Your comments have been very helpful. When I tested PG 2.1 in iOS, I had only changed PG version in config.xml, and forgotten to change version in index.html. Changing version to 2.1 in both places makes the plugin work for both iOS and Android. Great! – Per Quested Aronsson Nov 27 '12 at 14:19
0

To summarize:

The Childbrowser plugin which is bundled with Phonegap Build requires Phonegap version 2.1 to work with Android. Both versions 2.0 and 2.1 work with iOS. Just remember to set the Phonegap version in both config.xml AND index.html!

https://github.com/alunny/ChildBrowser/blob/master/README.md is the correct repository for this plugin, at least when using Phonegap Build.

Per Quested Aronsson
  • 11,380
  • 8
  • 54
  • 76