You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/04/20 21:29:44 UTC
ios commit: Fixed CB-544 - iOS Geolocation fails if Cordova.plist
EnableLocation = YES
Updated Branches:
refs/heads/master fd94c7abe -> 159cdfe4d
Fixed CB-544 - iOS Geolocation fails if Cordova.plist EnableLocation = YES
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/159cdfe4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/159cdfe4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/159cdfe4
Branch: refs/heads/master
Commit: 159cdfe4d674b2638c34a755f1b11a2c4fd34b75
Parents: fd94c7a
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri Apr 20 12:29:35 2012 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Apr 20 12:29:35 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/159cdfe4/CordovaLib/Classes/CDVLocation.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVLocation.m b/CordovaLib/Classes/CDVLocation.m
index 08081a7..64233d2 100755
--- a/CordovaLib/Classes/CDVLocation.m
+++ b/CordovaLib/Classes/CDVLocation.m
@@ -277,7 +277,9 @@
- (void) getLocation:(NSMutableArray *)arguments withDict:(NSMutableDictionary *)options
{
- NSString* callbackId = [arguments objectAtIndex:0];
+ NSUInteger argc = [arguments count];
+ NSString* callbackId = (argc > 0)? [arguments objectAtIndex:0] : @"INVALID";
+
if ([self isLocationServicesEnabled] == NO)
{
CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:2];
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/159cdfe4/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index 6071442..d9d00c9 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -158,7 +158,7 @@
*/
if ([enableLocation boolValue]) {
- [[self.commandDelegate getCommandInstance:@"Geolocation"] startLocation];
+ [[self.commandDelegate getCommandInstance:@"Geolocation"] getLocation:nil withDict:nil];
}
/*