You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Marvin Plummeridge (Created) (JIRA)" <ji...@apache.org> on 2012/04/19 23:40:40 UTC

[jira] [Created] (CB-544) iOS Geolocation fails if Cordova.plist EnableLocation = YES

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


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

        

[jira] [Resolved] (CB-544) iOS Geolocation fails if Cordova.plist EnableLocation = YES

Posted by "Shazron Abdullah (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah resolved CB-544.
---------------------------------

    Resolution: Fixed

Fix commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/159cdfe4
                
> 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

        

[jira] [Updated] (CB-544) iOS Geolocation fails if Cordova.plist EnableLocation = YES

Posted by "Shazron Abdullah (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-544:
--------------------------------

    Fix Version/s: 1.7.0
    
> 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

        

[jira] [Commented] (CB-544) iOS Geolocation fails if Cordova.plist EnableLocation = YES

Posted by "Shazron Abdullah (Commented) (JIRA)" <ji...@apache.org>.
    [ 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