cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-5753) iOS: CDVLocation locationManager didFailWithError
Date Tue, 02 Dec 2014 20:56:13 GMT


ASF GitHub Bot commented on CB-5753:

Github user clelland commented on the pull request:
    @tiff  - Thanks for the fix! Do you have an ICLA on file with Apache? It's probably not
necessary for something this size, but we generally request them from contributors. There
are details here:

> iOS: CDVLocation locationManager didFailWithError
> -------------------------------------------------
>                 Key: CB-5753
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Geolocation
>    Affects Versions: 2.9.0, 2.9.1
>         Environment: iOS
>            Reporter: Martin Robin
>            Assignee: Shazron Abdullah
>              Labels: patch
> The delegate handler for didFailWithError appears to have a couple of issues...
> According to the [documentation|],
{quote}If the location service is unable to retrieve a location right away, it reports a kCLErrorLocationUnknown
error and keeps trying. In such a situation, you can simply ignore the error and wait for
a new event.{quote}
> The handler within CDVLocation does not however take this into account and as a result
if this error is raised it causes the location manager to be shut down without any warning.
> Within the same handler, there appears to be code to send a notification back to the
JavaScript by way of the onError function. This notification is never received in the JavaScript
so the error cannot be handled (by calling clearWatch and then restarting with a call to watchPosition
for example).
> The first problem is (I believe) fairly easily resolved; simply ignoring the error (though
possibly notifying the JavaScript) would suffice.
> I have no idea how to resolve the second problem. I have tried tracing the code and it
appears to call commandDelegate::sendPluginResult (via returnLocationError) but the onError
function in the (my) JavaScript does not receive the error. I do not understand how the plug-in
model works enough to be able to follow up any further for myself.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message