iOS – 从代码运行第三方导航应用程序

我是新来的iOS,我想从我自己的应用程序运行导航应用程序。 现在我只是使用这个代码:

- (void)navigationButtonTap:(id)sender { Class mapItemClass = [MKMapItem class]; if (mapItemClass && [mapItemClass respondsToSelector:@selector(openMapsWithItems:launchOptions:)]) { // Create an MKMapItem to pass to the Maps app CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake([actualPlace.latitude doubleValue], [actualPlace.longitude doubleValue]); MKPlacemark *placemark = [[MKPlacemark alloc] initWithCoordinate:coordinate addressDictionary:nil]; MKMapItem *mapItem = [[MKMapItem alloc] initWithPlacemark:placemark]; [mapItem setName:actualPlace.Name]; // Pass the map item to the Maps app [mapItem openInMapsWithLaunchOptions:nil]; } } 

它的工作,我知道如何改变它运行苹果地图与导航开始。 没关系,但现在我正在考虑一些第三方的select。 如何与其他导航应用程序,如谷歌地图和其他? iOS用户可以将它们设置为默认并使用它们? 我怎样才能让用户select启动他想要的应用程序?

我发现了实施Google地图选项的代码 。 但是这是与苹果地图不同的代码。 我可以为所有的导航应用程序有相同的代码,然后用户决定运行哪个?

您可以启动第三方导航应用程序,并只在其他应用程序符合/实现url模式时移交地址或地理位置。 一些导航应用程序实际上这样做