CLLocationCoordinate2D to LocationList

Hey Everyone !

Can I save the content of a CLLocationCoordinate2D array into a LocationList (Cloud Kit field type) ?

Hey, Florian!

Were you able to find the answer to this by any chance?
A CloudKit "Location" is a CLLocation, so a LocationList is an array of CLLocation.

CLLocation contains a CLLocationCoordinate2D as one of it's fields, plus other items.
You can init a CLLocation using the latitude and longitude from your CLLocationCoordinate2D.

So you can create a list of CLLocation, to store on CloudKit.
CLLocationCoordinate2D to LocationList
 
 
Q