I am using google map directions I am trying that code but it doesn't work
if ([[UIApplication sharedApplication] canOpenURL:
[NSURL URLWithString:@"comgooglemaps://"]]) {
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:@"comgooglemaps://?center=40.765819,-73.975866&zoom=14&views=traffic"]];
} else {
NSLog(@"Can't use comgooglemaps://");
}
There is always message that "Can't use comgooglemaps:// Is There any additional setting to use this. I have read google doc but there is not such instructions to use any additional setting
In order for this
URL Scheme
to work you need to have the Google Maps app installed.If you want to use the callback option, you need your app to respond to some
URL Scheme
. In order to do so, please check this link. After that, pass your custom url scheme in thex-success
parameter.