As of now, I successfully generate directions with Maps app from my app with the following code :
NSString *formattedGroceryAddress = [[NSString stringWithFormat:@"%@",((EnhancedUIActionSheet *)actionSheet).grocery.address] stringByReplacingOccurrencesOfString:@" " withString:@"+"];
NSString *routeString = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%@",localDataHelper.userLocation.coordinate.latitude,localDataHelper.userLocation.coordinate.longitude,formattedGroceryAddress];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:routeString]];
It opens the Maps app with the appropriate driving directions. The thing is, I'd like to open Maps with the walking directions by default. Maybe I can pass another parameter in my request to do that.
Anybody knows how ?
Thanks !