I develop app for IOS 6.
I want to run maps application and pass it start and destination so I can navigate user.
UIApplication *app = [UIApplication sharedApplication];
NSString *coordinates = [NSString stringWithFormat:@"http://maps.google.com/maps?daddr=%f,%f&saddr=%f,%f", ...];
[app openURL:[NSURL URLWithString: coordinates]];
I thought that this code will open google maps in browser on simulator, and maps app on device, but on the device it runs browser google map.
Am i doing something wrong?
If you’re not aware, Apple no longer uses Google maps so you have to use their new URL scheme for the Apple maps.
(Note: if you’re supporting iOS 5, then you should use both. The google maps scheme and apple maps)
Here is an example query
http://maps.apple.com/maps?daddr=San+Francisco,+CA&saddr=cupertinoHere is the documentation for it: Apple Maps URL Schemes