Compiler error: Invalid library file - CoreLocation

前端 未结 6 1798
無奈伤痛
無奈伤痛 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'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 !

提交回复
热议问题