if UIApplication.shared.canOpenURL(URL(string:"yandexmaps://")!) {
let urlString = "yandexmaps://maps.yandex.ru/?rtext=\(currentLocation.coordinate.latitude),\(currentLocation.coordinate.longitude)~51.532147,46.612396&rtt=mt"
UIApplication.shared.open(URL(string: urlString)!)
}
这可以通过以下方式完成:
有关详细信息,请参见此处:https ://tech.yandex.ru/yandex-apps-launch/maps/doc/concepts/yandexmaps-ios-app-docpage/
您还需要记住为参数添加密钥
yandexmaps(info.plist有关LSApplicationQueriesSchemes密钥的更多详细信息,请参见此处)。