Quantcast
Channel: Core Data – Michael Tsai
Viewing all articles
Browse latest Browse all 217

Double Core Data Accessors by Omitting @NSManaged

$
0
0

Trevor Squires:

If our implementation is not exposed to Objective-C, then Core Data will not find it at runtime, which means that, yes, Core Data will dynamically generate the accessor implementation for us.

[…]

This is why I now consider Swift to be the most satisfying language for using Core Data. The fact that (more expressive) types can’t be represented in Objective-C is a benefit, not a limitation.

Swift NSManagedObject subclasses can provide Swift-only accessors which happily coexist with Core Data’s dynamically-generated ones, and that feels like the best of both worlds.


Viewing all articles
Browse latest Browse all 217

Trending Articles