Saving Swift CLLocation in CoreData
问题 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 location data using this objc converted to an NSValue . CLLocationCoordinate2D myLocation; NSValue *locationValue = [NSValue valueWithBytes:&myLocation objCType:@encode(CLLocationCoordinate2D)] // then put locationValue into storage - maybe an ObjC collection class or core data etc. Retrieving the object from the data store is supposed to work