I am currently trying to store an MKRoute object in core data. All I really need from it is the MKPolyLine so if I can store that that's fine too. I've tried using NSKeyedArchiver but that just simply throws an exception and crashes my program. Are there any other approaches to storing an MKRoute object in a core data object (A transformable object I'd assume)?
Asked
Active
Viewed 386 times
2
-
Because MKRoute does not implement NSCoding, you would have to implement it yourself in a subclass of it. This way, you could use NSKeyedArchiver to store it as an NSData object in Core Data. – erdekhayser Nov 28 '13 at 02:47
1 Answers
1
MKRoute
does not conform to NSCoding
so it will fail.archiving. However you can store it in some format like KML or GeoJSON by using a third-party coder.

Maxthon Chan
- 1,181
- 8
- 15