incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-544) iOS Geolocation fails if Cordova.plist EnableLocation = YES
Date Fri, 20 Apr 2012 09:52:40 GMT

    [ https://issues.apache.org/jira/browse/CB-544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13258122#comment-13258122
] 

Shazron Abdullah commented on CB-544:
-------------------------------------

When EnableLocation is set to YES, it calls the Location plugin and calls "startLocation"
on the plugin, which with the new updated code, does not initialize self.locationData first
(it is only initialized in [1]) and it will be null, thus getting Position.UNAVAILABLE always
because of that variable being null [2].

The fix is, on this line [3] you need to call getLocation instead, to initialize everything.

[1] https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocation.m#L287
[2] https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVLocation.m#L320
[3] https://github.com/apache/incubator-cordova-ios/blob/master/CordovaLib/Classes/CDVViewController.m#L161
                
> iOS Geolocation fails if Cordova.plist EnableLocation = YES
> -----------------------------------------------------------
>
>                 Key: CB-544
>                 URL: https://issues.apache.org/jira/browse/CB-544
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.6.0, 1.6.1, Master
>            Reporter: Marvin Plummeridge
>            Assignee: Shazron Abdullah
>            Priority: Critical
>             Fix For: 1.7.0
>
>
> Since 1.6.0, Cordova will return POSITION.UNAVAILABLE in all geolocation JS calls unless,
counterintuitively, 'EnableLocation' is set to 'NO' in Cordova.plist

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message