Activity

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.

Shazron Abdullah
added a comment - 20/Apr/12 10:51 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