I’ve a code that redirects the consumer to Google Maps or Apple Maps by urgent the map
, when Apple Maps is uninstalled, an alert seems asking the consumer to obtain Apple Maps and redirects the consumer to the App Retailer, once I choose Present in App Retailer, the consumer is redirected to App Retailer, after which the alert is proven once more.
let coordinate = CLLocationCoordinate2D(latitude: 52.5162746, longitude: 13.3755153)
let mapItem = MKMapItem(placemark: MKPlacemark(coordinate: coordinate))
mapItem.identify = "Check"
mapItem.openInMaps(launchOptions: [MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDefault])