objective c - How can I open Google Maps URL Scheme on iOS? -


as google map sdk doc description, can use code below call native google maps finish directions. how can test these code on xcode? return "can't use comgooglemaps://"?

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://"); } 

if ios 9 might want try this: under info custom ios taget properties, lsapplicationqueriesschemes. add comgooglemaps

enter image description here


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -