I am trying to save CLLocation
data in Core Data. My property is set as a Transformable object.
Some sample code out there indicates one can save the lo
This post is still helpful but a bit outdated.
To save CLLocation I use:
let clocation: [CLLocation]
let archivedLocation = NSKeyedArchiver.archivedData(withRootObject: clocation)
And to Fetch with Core Data:
let unarchivedLocation = NSKeyedUnarchiver.unarchiveObject(with: (coreDataLocation.value(forKey: "location") as! NSData) as Data) as! CLLocation)