Skip to content
Permalink
Browse files
CB-8351 Use argumentForIndex rather than NSArray extension
  • Loading branch information
agrieve committed Jan 23, 2015
1 parent 56620f9 commit b1c963f67be1063a34c4e6a93dbfa19f59ef424e
Showing 1 changed file with 4 additions and 4 deletions.
@@ -199,7 +199,7 @@ - (void)locationManager:(CLLocationManager*)manager
- (void)getLocation:(CDVInvokedUrlCommand*)command
{
NSString* callbackId = command.callbackId;
BOOL enableHighAccuracy = [[command.arguments objectAtIndex:0] boolValue];
BOOL enableHighAccuracy = [[command argumentAtIndex:0] boolValue];

if ([self isLocationServicesEnabled] == NO) {
NSMutableDictionary* posError = [NSMutableDictionary dictionaryWithCapacity:2];
@@ -232,8 +232,8 @@ - (void)getLocation:(CDVInvokedUrlCommand*)command
- (void)addWatch:(CDVInvokedUrlCommand*)command
{
NSString* callbackId = command.callbackId;
NSString* timerId = [command.arguments objectAtIndex:0];
BOOL enableHighAccuracy = [[command.arguments objectAtIndex:1] boolValue];
NSString* timerId = [command argumentAtIndex:0];
BOOL enableHighAccuracy = [[command argumentAtIndex:1] boolValue];

if (!self.locationData) {
self.locationData = [[CDVLocationData alloc] init];
@@ -263,7 +263,7 @@ - (void)addWatch:(CDVInvokedUrlCommand*)command

- (void)clearWatch:(CDVInvokedUrlCommand*)command
{
NSString* timerId = [command.arguments objectAtIndex:0];
NSString* timerId = [command argumentAtIndex:0];

if (self.locationData && self.locationData.watchCallbacks && [self.locationData.watchCallbacks objectForKey:timerId]) {
[self.locationData.watchCallbacks removeObjectForKey:timerId];

0 comments on commit b1c963f

Please sign in to comment.