I was attempting to test an app on the Xcode 11 simulator that used CoreLocation. I wanted to use the "Freeway Drive" location option in the simulator under Debug > Location to test the MapKit polyline overlay.
Unfortunately, no line was placed on the map and "Compiler error: Invalid library file" was printed numerous times in the log.
It does not seem to be a code problem but more of an Xcode problem. Is there any way around this? It is very difficult to test with a physical device because movement in a confined space doesn't really pick up with CoreLocation.
Thanks!
just define the polyline and "push" it into your mapView:
let polyline = MKPolyline(coordinates: locations, count: locations.count) mapView.addOverlays([polyline])and declare the mkMapViewDelegate's function:
It should show the polyline on the mapView. I have the compiler error too and try to fix it.
Best Dragan