alunny / ChildBrowser

cross-platform ChildBrowser plugin for PhoneGap/Cordova
104 stars 134 forks source link

Really works in PhoneGap 2.1? #22

Closed ChristianWeyer closed 11 years ago

ChristianWeyer commented 11 years ago

Does really anybody have this working in PG 2.1? I get undefined on window.plugins ... and when looking at childbrowser.js it still uses addConstructor which is (AFAIK) deprecated...

Hm.

ChristianWeyer commented 11 years ago

One immediate fix is to replace gap. with cordova.

alunny commented 11 years ago

It works for me on 2.1.

addConstructor is still there, and has no deprecation warning: https://github.com/apache/incubator-cordova-js/blob/master/lib/cordova.js#L229

window.plugins is defined in the constructor: https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L106-110

and gap is a backwards-compatible alias for cordova https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L115

Are you waiting for deviceready to check for window.plugins?

ChristianWeyer commented 11 years ago

Hm. Yes I am waiting for deviceready. Strange. When I explicitly use cordova. instead of .gap it works.

Sent from a mobile device. Please excuse brevity and typos.

Am 23.10.2012 um 20:13 schrieb "Andrew Lunny" notifications@github.com<mailto:notifications@github.com>:

It works for me on 2.1.

addConstructor is still there, and has no deprecation warning: https://github.com/apache/incubator-cordova-js/blob/master/lib/cordova.js

window.plugins is defined in the constructor: https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L106-110

and gap is a backwards-compatible alias for cordova https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L115

Are you waiting for deviceready to check for window.plugins?

— Reply to this email directly or view it on GitHubhttps://github.com/alunny/ChildBrowser/issues/22#issuecomment-9711954.

ChristianWeyer commented 11 years ago

Like cordova.exec instead of gap.exec

Sent from a mobile device. Please excuse brevity and typos.

Am 23.10.2012 um 21:53 schrieb "Christian Weyer" christian.weyer@thinktecture.com<mailto:christian.weyer@thinktecture.com>:

Hm. Yes I am waiting for deviceready. Strange. When I explicitly use cordova. instead of .gap it works.

Sent from a mobile device. Please excuse brevity and typos.

Am 23.10.2012 um 20:13 schrieb "Andrew Lunny" notifications@github.com<mailto:notifications@github.com>:

It works for me on 2.1.

addConstructor is still there, and has no deprecation warning: https://github.com/apache/incubator-cordova-js/blob/master/lib/cordova.js

window.plugins is defined in the constructor: https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L106-110

and gap is a backwards-compatible alias for cordova https://github.com/alunny/ChildBrowser/blob/master/www/childbrowser.js#L115

Are you waiting for deviceready to check for window.plugins?

— Reply to this email directly or view it on GitHubhttps://github.com/alunny/ChildBrowser/issues/22#issuecomment-9711954.

dylanjmcdonald commented 11 years ago

I have it working on 2.1, however I did have to update Cordova.plist to this: xCode Screenshot

Knitter commented 11 years ago

I can confirm it works with even version 2.2, without having to change anything in the JS file, but mapping the plugin as mentioned above.

ChristianWeyer commented 11 years ago

Yes, I can confirm - thx all!