Skip to content
Browse files

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

… rather than NSDictionary
  • Loading branch information...
1 parent 0e19476 commit 46cb086d871b1a7da251c9fd959a49bcbedc87e6 @moredip committed Oct 30, 2012
Showing with 6 additions and 2 deletions.
  1. +1 −1 lib/PublicAutomation
  2. +5 −1 src/LocationCommand.m
2 lib/PublicAutomation
@@ -1 +1 @@
-Subproject commit a3997a7176a8e54257625b4ef56e00eaefb2ef57
+Subproject commit 8df5cd1f1ff7f23bae22757e693e3eac0a588eaa
View
6 src/LocationCommand.m
@@ -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.
Something went wrong with that request. Please try again.