I have a little strange issue which I can\'t seem to figure out, I have a simple entity with a custom NSManagedObject subclass:
@objc(EntityTest) class Entit
Following on from CH Buckingham who is entirely correct. You are attempting to store a primitive type in core data where it is expecting an NSNumber.
The correct usage would be entity.completed = NSNumber.numberWithBool(false)
This is also why you cannot retrieve this completed value as a bool directly and thus you would need to write:
var: Bool? = entity.completed.boolValue()