Permalink
Browse files

change to PublicAutomation setLocation API - we are passing a CGFloat…

… rather than NSDictionary
  • Loading branch information...
moredip committed Oct 30, 2012
1 parent 0e19476 commit 46cb086d871b1a7da251c9fd959a49bcbedc87e6
Showing with 6 additions and 2 deletions.
  1. +1 −1 lib/PublicAutomation
  2. +5 −1 src/LocationCommand.m
View
@@ -23,7 +23,11 @@ - (NSString *)handlePost:(NSString *)requestBody{
andDetails:[NSString stringWithFormat:@"you have to provide both longitude and latitude"]];
}
- [UIAutomationBridge setLocation:requestCommand];
+ CGPoint locationAsPoint = CGPointMake([[requestCommand objectForKey:@"latitude"] floatValue],[[requestCommand objectForKey:@"longitude"] floatValue]);
+
+ NSLog(@"simulating location of %f,%f",locationAsPoint.x, locationAsPoint.y);
+
+ [UIAutomationBridge setLocation:locationAsPoint];
return [FranklyProtocolHelper generateSuccessResponseWithoutResults];
}

0 comments on commit 46cb086

Please sign in to comment.