Updated Branches: refs/heads/master 1f13eb693 -> 31797a702
[CB-1520] InvalidArgumentException when EnableLocation is Yes on Cordova.plist Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/31797a70 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/31797a70 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/31797a70 Branch: refs/heads/master Commit: 31797a7020cbd2d0997382667ff8e3adc19c2ad3 Parents: 1f13eb6 Author: Shazron Abdullah <shaz...@apache.org> Authored: Fri Sep 21 12:32:23 2012 -0700 Committer: Shazron Abdullah <shaz...@apache.org> Committed: Fri Sep 21 12:32:30 2012 -0700 ---------------------------------------------------------------------- CordovaLib/Classes/CDVLocation.m | 4 +++- CordovaLib/Classes/CDVViewController.m | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/31797a70/CordovaLib/Classes/CDVLocation.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVLocation.m b/CordovaLib/Classes/CDVLocation.m index 4ec8119..cdf6fb6 100644 --- a/CordovaLib/Classes/CDVLocation.m +++ b/CordovaLib/Classes/CDVLocation.m @@ -253,7 +253,9 @@ if (!__locationStarted || (__highAccuracyEnabled != enableHighAccuracy)) { // add the callbackId into the array so we can call back when get data - [lData.locationCallbacks addObject:callbackId]; + if (callbackId != nil) { + [lData.locationCallbacks addObject:callbackId]; + } // Tell the location manager to start notifying us of heading updates [self startLocation:enableHighAccuracy]; } else { http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/31797a70/CordovaLib/Classes/CDVViewController.m ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m index c8db901..562820c 100644 --- a/CordovaLib/Classes/CDVViewController.m +++ b/CordovaLib/Classes/CDVViewController.m @@ -219,7 +219,7 @@ */ if ([enableLocation boolValue]) { - [[self.commandDelegate getCommandInstance:@"Geolocation"] getLocation:nil]; + [[self.commandDelegate getCommandInstance:@"Geolocation"] getLocation:[CDVInvokedUrlCommand new]]; } /*