It's a little bit complicated, for historical reasons.In Swift a class can be Objective-C compatible, or not Obj-C compatible. The difference is what superclass they inherit from. (Basically, Obj-C classes inherit from NSObject.)Core Data, and the archiving behavior I mentioned, come from the Obj-C past, and so expect Obj-C compatible objects.A Swift struct is never Obj-C compatible. That means, to use a struct with Core Data or archiving, you have use an intermediate conversion to/from an Obj-C that is similar to the struct. That's why there are extra steps involved.
Topic:
Programming Languages
SubTopic:
Swift
Tags: