Compiler error: Invalid library file - CoreLocation

前端 未结 6 1723
無奈伤痛
無奈伤痛 2021-02-06 23:09

I have one of my application, that is created in Xcode 8. I have used CoreLocation and MapKit in that app.

I have update app with latest iOS till now. and i

相关标签:
6条回答
  • 2021-02-06 23:47

    I started running into this error recently and was able to get it to go away by clearing the Simulator from Hardware->Erase All Content and Settings... menu item.

    0 讨论(0)
  • 2021-02-06 23:47

    I've got the problem too, trying to update multiple polylines coordinates.

    The problem was coming, in fact, from the way new coordinates were pushed into the array containing the polylines coordinates (which is a property of a model object in my case).

    To get the problem, i was just pushing new coordinates into that array.

    To solve the problem, I had to clone that array first in a new var, then add the new coordinate into the cloned array and update the model property.

    Before, i was doing :

    existingArray.push(object);
    

    Now, I am doing :

    var newArray = [...existingArray];
    
    newArray.push(object);
    
    existingArray = newArray;
    

    Hope it can help !

    0 讨论(0)
  • 2021-02-06 23:56

    For me, this only happens when I have Traffic turned on for the map.

    I leave the feature on but turn it off in the simulator:

    @IBOutlet
    var mapView: MKMapView? {
        didSet {
            #if targetEnvironment(simulator)
            mapView?.showsTraffic = false
            #endif
        }
    }
    
    0 讨论(0)
  • 2021-02-06 23:57

    I worked around this by using SwiftLog to log my messages, putting some unique string inside the tag of each logger (could just be com.yourcompany.yourapp to differentiate it), and then filtering to messages which contain that tag on the console.

    A more general solution would be to have a negative filter inside the console view, which would obviate the need to use the logger in this way.

    0 讨论(0)
  • 2021-02-06 23:59

    I'm seeing this issue also. It only happens if you implement the renderFor overlay for MKMapView. And without this function, I can't display the polyline that I'm adding to the mapView. This was working fine in Xcode 10.

    0 讨论(0)
  • 2021-02-07 00:11

    Hope this will be fixed in the next version of xcode. But this only happens on the simulator. Use your real device for testing for now..

    0 讨论(0)
提交回复
热议问题