Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcode and waze integration

Tags:

xcode

ios

I'm trying to integrate my app with waze.

Anyone know how can I call waze and send the coordinates?

I didn’t find any API or other information about it..

like image 249
Marcelo Almeida Rocha Avatar asked May 21 '12 15:05

Marcelo Almeida Rocha


1 Answers

- (void) navigateToLatitude:(double)latitude
                  longitude:(double)longitude
{
   if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"waze://"]]) {
      //Waze is installed. Launch Waze and start navigation
      NSString *urlStr = [NSString stringWithFormat:@"waze://?ll=%f,%f&navigate=yes", latitude, longitude];
      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
   } else {
      //Waze is not installed. Launch AppStore to install Waze app
      [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.apple.com/us/app/id323229106"]];
   }
}
like image 169
Marcelo Almeida Rocha Avatar answered Nov 13 '22 21:11

Marcelo Almeida Rocha