A user is able to request directions to a specific location using our CarPlay application. We are utilising Maps to achieve this functionality:let placemark = MKPlacemark(coordinate: item.coordinate)
let mapitem = MKMapItem(placemark: placemark)
let options = [MKLaunchOptionsDirectionsModeKey: MKLaunchOptionsDirectionsModeDriving]
mapitem.name = item.mainTitle
if !mapitem.openInMaps(launchOptions: options) {
...
} else {
...
}
This code worked well before iOS 13. It opened the Maps app with directions on the head unit. CarPlay application mirrored the iPhone content. However, because the CarPlay is now decoupled from the actual on-screen content of the iPhone, we can't find a way to force the system to open the Maps app in CarPlay instead of the phone. Does anybody know a way to achieve this?