Aynı problemi yaşadım, ancak koordinatları UIActivityViewController üzerinden çalışmak için bir yanıt bulamadım.
Bir geçici çözüm olarak, farklı harita sağlayıcılarıyla bir eylem sayfası aldığınız WhatsApp uygulamasında kullanılmakta olduğunu gördüklerime benzer bir yaklaşım kullandım. Aşağıdaki kod bir uyarı gösterecek ve Waze/Google Maps/Apple Maps aracılığıyla belirli bir konumu açmayı seçmenize izin verecektir - sadece yüklü uygulamalar görünecektir. Sadece "boylam" ve "enlem" değerlerini CLLocationCoordinate2D enlem/boylam özelliklerinizle değiştirin.
UIAlertController* alert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction* appleMaps = [UIAlertAction actionWithTitle:@"Open in Maps" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://maps.apple.com/?q=%@,%@", latitude, longitude]]];
}];
UIAlertAction* googleMaps = [UIAlertAction actionWithTitle:@"Open in Google Maps" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"comgooglemaps://?q=%@,%@", latitude, longitude]]];
}];
UIAlertAction* waze = [UIAlertAction actionWithTitle:@"Open in Waze" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"waze://?ll=%@,%@", latitude, longitude]]];
}];
[alert addAction:appleMaps];
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"comgooglemaps://"]])
[alert addAction:googleMaps];
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"waze://"]])
[alert addAction:waze];
UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleCancel handler:nil];
[alert addAction:cancel];
[self presentViewController:alert animated:YES completion:nil];