为什么我收到“-[__ SwiftValue MKCoordinateValue]:无法识别的选择器发送到实例”错误

运行我的Swift代码时出现以下错误消息;

  

2019-11-11 15:59:58.737125 + 0000 GoSiteUK [53192:1746609]-[__ Swiftvalue MKCoordinateValue]:无法识别的选择器已发送到实例0x60000037c720
  2019-11-11 15:59:58.741797 + 0000 GoSiteUK [53192:1746609] ***由于未捕获的异常'NSInvalidArgumentException'而终止应用程序,原因:'-[__ Swiftvalue MKCoordinateValue]:无法识别的选择器已发送至实例0x60000037c720'

此代码以前在几周前运行良好,但现在没有任何变化。

let destinationPlacemark = MKPlacemark(coordinate: CLLocationCoordinate2D(latitude: 50.0,longitude: 1.0))
let destinationmapItem = MKMapItem(placemark: destinationPlacemark)

destinationmapItem.openInmaps(launchOptions: [
    MKLaunchOptionsDirectionsModeKey : MKLaunchOptionsDirectionsModeDriving,MKLaunchOptionsMapCenterKey : CLLocationCoordinate2D(latitude: 51.0,longitude: 0.5)
] )

我希望“地图”应用能够打开,并且没有错误消息。

azhenzhen 回答:为什么我收到“-[__ SwiftValue MKCoordinateValue]:无法识别的选择器发送到实例”错误

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3122844.html

大家都在问