2012-05-21 13 views
5

のアプリwazeに統合しようとしています。xcodeとwazeの統合

誰もがwazeを呼び出して座標を送信する方法を知っていますか?

私は、任意のAPIまたはそれに関するその他の情報を見つけることができませんでした。..

答えて

8
- (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"]]; 
    } 
} 
+1

私は本当の電話で、それを試してみましたが、何も起こらなかった:( –