Core plugins have been updated on PhoneGap Build

  • 2
  • Announcement
  • Updated 6 years ago
The core plugins have been updated on PhoneGap Build. The next time you upload your app, it will be built with these updated versions (unless you've hardcoded plugins versions into your config.xml file).

Core plugins are the Apache Cordova plugins which have the prefix org.apache.cordova.*.

If you'd like to continue to use a previous version, simply hardcode that version into your config.xml, for example:


<gap:plugin name="org.apache.cordova.geolocation" version="0.3.7" />


Omitting the version attribute will always build with the latest version of the plugin.

Here are the newly updated plugins and versions, along with links to their changelogs:

org.apache.cordova.file @ 1.3.1
org.apache.cordova.globalization @ 0.3.1
org.apache.cordova.vibration @ 0.3.11
org.apache.cordova.splashscreen @ 0.3.3
org.apache.cordova.media @ 0.2.13
org.apache.cordova.inappbrowser @ 0.5.2
org.apache.cordova.dialogs @ 0.2.10
org.apache.cordova.device-motion @ 0.2.10
org.apache.cordova.console @ 0.2.11
org.apache.cordova.battery-status @ 0.2.11
org.apache.cordova.camera @ 0.3.2
org.apache.cordova.network-information @ 0.2.12
org.apache.cordova.media-capture @ 0.3.3
org.apache.cordova.geolocation @ 0.3.10
org.apache.cordova.file-transfer @ 0.4.6
org.apache.cordova.device @ 0.2.12
org.apache.cordova.device-orientation @ 0.3.9
org.apache.cordova.contacts @ 0.2.13
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes

Posted 6 years ago

  • 2
Photo of Stephan Toth

Stephan Toth

  • 4 Posts
  • 0 Reply Likes
Hi, is it possible that geolocation is not working? On iPhone 5s with iOS 8.0.0 we get Error Code 1 - permission denied.

Yesterday everything was fine...
Photo of ryan

ryan, Developer

  • 1538 Posts
  • 132 Reply Likes
Hi, is it possible that geolocation is not working? On iPhone 5s with iOS 8.0.0 we get Error Code 1 - permission denied.


If everything was working fine yesterday, you should be able to just hardcode the old version as stated above and continue to use it. Also, check out Shazron's latest blog post which discusses iOS 8 and the latest Geolocation plugin.
Photo of David Norris

David Norris

  • 20 Posts
  • 1 Reply Like
Ryan,

The geolocation plugin is not working with the latest version of PhoneGap (PhoneGap Build) for iOS 8.0.2. Several of us tested this on several versions of the plugin with several version of PhoneGap Build. It wasn't until we add a gap:config-file statement in our config.xml that it will work (see my earlier posts). Apparently "NSLocationAlwaysUsageDescription" needs to be in the Info.plist file and after examining the results from PhoneGap Build it is missing.

Will this be resolved in the near future?

David Norris
DynoForms.com
Photo of dtbaker

dtbaker

  • 19 Posts
  • 0 Reply Likes
Hey is this fixed now? Having same issues.
Photo of Clemens Lermen

Clemens Lermen

  • 17 Posts
  • 1 Reply Like
Thanks for the hint - I'll get the same Error Code with my iPhone 6
Photo of tbadaczewski

tbadaczewski

  • 11 Posts
  • 3 Reply Likes
Geolocation plugin has just stopped working for me regardless if I'm using 0.3.7 or 0.3.10. I've even updated to PhoneGap 3.6.3 today and it doesn't work.

I'm on a iPhone 4s running iOS8.
Photo of Thodoris Elissaios

Thodoris Elissaios

  • 8 Posts
  • 1 Reply Like
Geolocation plugin is not working ! please help !
Photo of David Norris

David Norris

  • 20 Posts
  • 1 Reply Like
Geolocation plugin not working for me either! I get error code 3 "Position retrieval timed out" no matter what I try with PhoneGap Build 3.6.3 and iOS 8.0.2 running on an iPhone 4S. I have tried several versions of the geolocation plugin including the latest to no avail. Note this is an app that has been in the app store for a while. I made no code changes (except config.xml) and it works on prior iOS versions. I have been pulling my hair out all day trying to fix this. Note: I never get the popup window asking permission to use GPS within my app like before when I make a call to navigator.geolocation.getCurrentPosition.

In the console I noticed that I am getting the following error:

ERROR: com.dynoforms.dynoforms is depending on legacy on-demand authorization, which is not supported for new apps

Not for sure if this is related to the geolocation issue or not.

PLEASE HELP! I have an important release to make and I can't until GPS is working.
----------------------------

UPDATE - I FOUND A FIX
After a lot of searching I found a fix by adding this to my config.xml file:

<gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" overwrite="false">
<array>
<string>Allow GPS</string>
</array>
</gap:config-file>

Apparently "NSLocationAlwaysUsageDescription" needs to be in the Info.plist file and after examining the results from PhoneGap Build it is missing. So I researched how to add values to the Info.plist file via config.xml and this worked. Note: The team responsible for the plugins should still fix this. Links that helped me:

http://phonegap.com/blog/2014/01/30/c...

See Step 3:
http://matthewfecher.com/app-develope...
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Excellent. Thanks, David!
Photo of Asif

Asif

  • 3 Posts
  • 0 Reply Likes
Hi David,

Still same issue, even I have added "gap:config-file" inside config.xml, geolocation plugin (version 0.3.10) is not working for Phongap (version 3.6.3) on iOS 8.0.2. It returns error.code as 1 without any message. Is there any other workaround for this?
Photo of David Norris

David Norris

  • 20 Posts
  • 1 Reply Like
My only suggestion is to make sure you are using the latest plugin by adding this to your config.xml file:

<gap:plugin name="org.apache.cordova.geolocation" version="0.3.10" />

Also make sure you call any GPS or other PhoneGap API's after PhoneGap is initialized (deviceready event). I noticed in 3.6.3 this takes a little longer and I found some of my own code that broke because I made this oversight and I had to move it to an onDeviceReady() function that I associated to the deviceready event.

Lastly here is how I get GPS successfully in my app:

// Call this code after PhoneGap has been initialized (deviceready event)
var options = {
enableHighAccuracy: false,
timeout: 10000,
maximumAge: 0
};
function success(position) {
var coords = position.coords;
var mylat=coords.latitude;
var mylong=coords.longitude;
console.log('LAT: ' + mylat);
console.log('LONG: ' + mylong);
// Do something with GPS here....
};
function error(err) {
alert('ERROR(' + err.code + '): ' + err.message);
};
navigator.geolocation.getCurrentPosition(success, error, options);
// End

Also try my suggested fix in config.xml for adding NSLocationAlwaysUsageDescription to the Info.plist file without the array property (this is how I now do this in my config.xml:

<gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" overwrite="false"></gap:config-file>

Also uninstall and reinstall your app.
Photo of Asif

Asif

  • 3 Posts
  • 0 Reply Likes
Hi David,

Thanks for brief info. Yes solution seems to be working in iOS8.
Photo of Darrell

Darrell

  • 1 Post
  • 0 Reply Likes
Hi David,

Have this dialog prompted to you? http://i.stack.imgur.com/ckq7c.png
Photo of Oscar Morales

Oscar Morales

  • 6 Posts
  • 0 Reply Likes
Hi,

It seems that method navigator.notification.alert on org.apache.cordova.dialogs stopped working for ios 7.0 . Can anybody confirm this?

I've tried to hardcode version 0.2.9 in config.xml, but it says "plugin unsupported: org.apache.cordova.dialogs @ 0.2.9"

Thanks
Photo of David Norris

David Norris

  • 20 Posts
  • 1 Reply Like
For the navigator.notification.alert question:

It is working for me on iOS 7.0.4 with PhoneGap 3.6.3. The version of my plugin in config.xml:

<gap:plugin name="org.apache.cordova.dialogs" version="0.2.10" />

Sample popup alert code that works for me (make sure to call after PhoneGap is initialized:

navigator.notification.alert("Hey!");

For a confirm message:

function ClickedOk(buttonIndex) {
if (buttonIndex === 1) {
// Pressed Ok button do something...
}
}

navigator.notification.confirm(
'Press Ok to reset app and all settings', // message
ClickedOk // callback to invoke with index of button pressed
'Reset App', // title
['Ok','Cancel'] // buttonLabels
);
Photo of Oscar Abilleira Muñiz

Oscar Abilleira Muñiz

  • 157 Posts
  • 5 Reply Likes
device.platform has also stoped working in windows phone 8.1
Photo of dcardosopt

dcardosopt

  • 4 Posts
  • 0 Reply Likes
navigator.device is undefined, as so I can't use any plugin
Photo of WellBload

WellBload

  • 9 Posts
  • 0 Reply Likes
Photo of Oscar Abilleira Muñiz

Oscar Abilleira Muñiz

  • 157 Posts
  • 5 Reply Likes
Yes that's the problem ... No www plugins folder is created inside xap file with all versions of phonegap
Photo of dcardosopt

dcardosopt

  • 4 Posts
  • 0 Reply Likes
In my case it's a bit worst, I was working properly for all platforms (IOS, Android and WP) and now the plugins don't work in any of them.
The Android and WP I can do the builds on my machine and they work, but as I don't have an Mac, my IOS build is broken.
Photo of Chris C

Chris C

  • 33 Posts
  • 1 Reply Like
I added this statement to my config.xml in pgb and forced it to use 3.6.3 but my IOS 8.02 device fails to determine my location. I checked in the Settings and my app is set to While Using for location services.

Is there something else I should be using? I have not forced a particular version of the plugin:


<gap:plugin name="org.apache.cordova.geolocation" />



<gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" overwrite="false">
<array>
<string>Allow GPS</string>
</array>
</gap:config-file>
Photo of Chris C

Chris C

  • 33 Posts
  • 1 Reply Like
I got it to work with the above but forcing it to use 0.3.10

<gap:plugin name="org.apache.cordova.geolocation" version="0.3.10" />
Photo of Oscar Abilleira Muñiz

Oscar Abilleira Muñiz

  • 157 Posts
  • 5 Reply Likes
+1 this problem (geolocation under ios 8) must be solved ... I think is critical
Photo of Aidan Jalali

Aidan Jalali

  • 11 Posts
  • 0 Reply Likes
I'm getting a problem with the dialogs plugin on Android 4.4.4/Nexus 5; Can't seem to see input text on any navigator.notification.prompt. The actual input works fine, but for some reason the text is invisible!

EDIT: I've also tried rolling back to an earlier version of the dialogs plugin and it won't let me:

'plugin unsupported: org.apache.cordova.dialogs @0.2.9'

This is urgent - my app is effectively completely broken until this issue gets fixed!
Photo of alen glina

alen glina

  • 1 Post
  • 0 Reply Likes
I think the Android native "menubutton" event listener has stopped working as well. I can't seem to get it to respond.

Thanks,
AJG
Photo of Nicholas Frye

Nicholas Frye

  • 3 Posts
  • 0 Reply Likes
Has anybody tried NSLocationWhenInUseUsageDescription? I tried the exact same strategy Chris C suggested with no luck--PG 3.6.3, and geolocation 0.3.10. I inspected the .plist that build returned, and the key was there, but no value. I tried again, but making the string the only child node of the node, and had the same result.

With or without the array node, when I run the app, I'm not getting asked for permission to use GPS when I should be (opening a map to get directions, well after device ready fired), and its not getting permissions. Additionally, after the app should have asked for permissions, when I go to settings, and find the app, there are no location services listed under privacy. If I go to privacy first, then select location services, then privacy, my app appears with the two options 'never', and 'while using the app', but NEITHER are selected.

Just heard the suggestion to include the NSLocationAlwaysUsageDescription key regardless of whether or not I need it, but when I include that, it asks whether the app can always monitor location.

Any help? Assuming this is a build issues since it's spitting out that plist key with an empty value.
Photo of Johan Sebelius

Johan Sebelius

  • 16 Posts
  • 0 Reply Likes
Hi Nicolas! Did you find a solution for your problem, I stuck at the very same issue?
Photo of Harrier Studios

Harrier Studios

  • 36 Posts
  • 1 Reply Like
Have there been any updates from Phonegap about fixing the Geolocation problem?

I have tried just about every fix that has been posted here and elsewhere but to no avail.
Photo of Johan Sebelius

Johan Sebelius

  • 16 Posts
  • 0 Reply Likes
I ́ve tried both downgrading to phonegap 3.5.0 using geolocation 0.3.7
Which works. But prompts directly at launch. And prompt to be used "always" or "never".

Same is when using phonegap 3.6.3 and geolocation 3.10 with the fix suggested about by, David Norris, Tony Slack among others.

With the fix :


<gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" overwrite="false">
<array>
<string>Allow GPS at all times</string>
</array>
</gap:config-file>
<gap:config-file platform="ios" parent="NSLocationWhenInUseUsageDescription" overwrite="false">
<array>
<string>Allow GPS when App is in use</string>
</array>
</gap:config-file>


The issue with this is that it launches directly upon launch and always asks top be used "Always, even with app running in background.".
My app ONLY requires geolocation to be enabled when running. In Info.plist NSLocationWhenInUseUsageDescription doesn't get set.

Has anyone successfully got this to work? - Without the prompt asking to allow local services all the time, and instead only when app in use.
My app requires the app to launch the Geolocation to launch at first use, is this possible?

Any update on the progress of geolocation 0.3.11 for phonegap build ?
Photo of Nicholas Frye

Nicholas Frye

  • 3 Posts
  • 0 Reply Likes
I still haven't had any luck. Developer is saying both here and on github that he can't recreate the issue (can get 'when in use' to work). I've moved on and client has accepted 'always in use'.
Photo of Clemens Lermen

Clemens Lermen

  • 17 Posts
  • 1 Reply Like
The NSLocationAlwaysUsageDescription seems to work for me... but not the NSLocationWhenInUseUsageDescription.

Is there some way to activate GPS only for "in use" with PGB?
Photo of Plenum

Plenum

  • 37 Posts
  • 1 Reply Like
Has anyone gotten when in use to work?
Photo of dtbaker

dtbaker

  • 19 Posts
  • 0 Reply Likes
Bump! same issues here.
Photo of Clemens Lermen

Clemens Lermen

  • 17 Posts
  • 1 Reply Like
+1 ... some love needed here ;)
Photo of dtbaker

dtbaker

  • 19 Posts
  • 0 Reply Likes
http://community.phonegap.com/nitobi/... more details about it here
Photo of dtbaker

dtbaker

  • 19 Posts
  • 0 Reply Likes
I'm seeing hundreds of gps errors come through logs on our live app. I cannot re-produce the issue here on iOS8 so it's tricky to test.

So I'm just going to try add

<gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" overwrite="false">
<array>
<string>Allow GPS</string>
</array>
</gap:config-file>

to config.xml and push a new update to see if that works.

* eek *