Cordova 3.1.0 Now on PhoneGap Build

  • 1
  • Announcement
  • Updated 7 years ago
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes

Posted 7 years ago

  • 1
Photo of Red2678

Red2678

  • 255 Posts
  • 0 Reply Likes
Wooooo! Thanks Ryan and Team! :D
Photo of Choden Quach

Choden Quach

  • 11 Posts
  • 0 Reply Likes
In config.xml file for PhoneGap Build, what do I have to change to use Cordova/PhoneGap 3.1.0? Where can I find the new documentation? Which 3rd party plugins https://build.phonegap.com/plugins are compatible with Cordova 3.1?
Photo of Niall O'Doherty ✈

Niall O'Doherty ✈

  • 4 Posts
  • 0 Reply Likes
@Choden
You can explicitly set the version to be 3.1 using the following prefernce in your config.xml file:

<preference name="phonegap-version" value="3.1.0" />

Also the latest API reference can be found here:
http://docs.phonegap.com/en/3.1.0/

Each plugin has details of "PhoneGap Version(s)" under "Other Details" which will tell you whether or not is supports v3.1 - see https://build.phonegap.com/plugins/261
Photo of Choden Quach

Choden Quach

  • 11 Posts
  • 0 Reply Likes
@Niall. We rely on several 3rd party Phonegap plugins namely, Facebook Connect, AppAvailability, SocialSharing, WebIntent, etc. in our iOS and Android apps. Except for the Facebook Connect plugins, other plugins are still at Phonegap 2.9. Unless the PhoneGap Build team sorts out the plugins compatibility issues, we are still unable to migrate to PhoneGap Build 3.1. Please make it a priority.
Photo of Eddy Verbruggen

Eddy Verbruggen, Champion

  • 375 Posts
  • 86 Reply Likes
The SocialSharing plugin with 3.x compatibility is pending for review for quite a while now, I hope it will be approved one of these days.
Photo of François-Régis Simon Peretti

François-Régis Simon Peretti

  • 26 Posts
  • 1 Reply Like
Hi there,

Please guys do something to make the childBrowser plugin available on PG 3.1.0 because this third-party plugin is way more efficient than the core plugin inAppBrowser !!

Thanx...
Photo of renemaasblog

renemaasblog

  • 31 Posts
  • 5 Reply Likes
And most plugins don't even work with 3.0 -.-
Photo of James B

James B

  • 24 Posts
  • 0 Reply Likes
PLEASE HELP

I'm trying to get my app working with cordova 3.1 but at the moment just receiving a blank screen. I think this is an issue with the new plugin architecture, can someone validate by config.xml.

I have this working under cordova 3.1 but the config.xml is entirely different to phonegap build's is this correct? or is the documentation just out of date?
Photo of James B

James B

  • 24 Posts
  • 0 Reply Likes
App ID is 246278
Photo of James B

James B

  • 24 Posts
  • 0 Reply Likes
Can you also clear this up for me.

In the config.xml docs it says javascript links should be included for plugins (https://build.phonegap.com/docs/confi...)

In the plugins page is says just include phonegap.js but gives an example where the barcode library is included (https://build.phonegap.com/docs/plugi...)
Photo of Red2678

Red2678

  • 255 Posts
  • 0 Reply Likes
I think there are a lof of changes going on. With that being said, here is a config.xml example.

http://pastebin.com/WmAerDvf

To your second question, I had to include both the plugin and the "feature" tag.
Photo of David Waller

David Waller

  • 5 Posts
  • 0 Reply Likes
When using 3.1.0, the Device plugin still reports cordova version at 3.0.0 (window.device.cordova). The PGB page for my app (595061) says I'm using 3.1.0, so I'm assuming the Device plugin is simply lying?
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
Hrm interesting. Are you on Android?

I just tested and actually found that Android device.cordova reported the string 'dev'. iOS reported the version correctly.

Can you share your App ID so I can have a look?
Photo of David Waller

David Waller

  • 5 Posts
  • 0 Reply Likes
I'm on an iPhone 5, iOS 7.0.2. AppID, as stated, is 595061. :)
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
oh yeah there it is.
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
@David, I can't reproduce this. I didn't see where your app reports the cordova version, so i added the following to your index.html head:
<script>
document.addEventListener('deviceready', function() {
alert(device.cordova);
}, false);
</script>

and it reported 3.1.0.

My test app is also successfully reporting 3.1.0:
https://github.com/wildabeast/PhoneGa...
Photo of David Waller

David Waller

  • 5 Posts
  • 0 Reply Likes
Huh, that's weird. If you're actually running the app on a device; click the information icon (second from right), select error report, click the reporter button, and you'll see a screen with info containing data from window.device (among others). There cordova is reported as "3.0.0".

I get the same using weinre when I check window.device.cordova in the console.

Tried it again just a moment ago, same result both in app and using weinre.

Can it be something that isn't updated through hydration? I haven't reinstalled the app since before the upgrade.
Photo of David Waller

David Waller

  • 5 Posts
  • 0 Reply Likes
Doh! Yeah, that was it. Sorry, I should have realized! Mea culpa!