When you use scalar properties, you need to provide getter and setter implementations for these properties yourself, as described in the documentation:
"You can declare properties as scalar values, but for scalar values, Core Data cannot dynamically generate access methods - you must provide your own implementations (see" Access methods for managed objects "). Basic data automatically synthesizes primitive access methods (primitiveLength and setPrimitiveLength :), but you need to declare them to suppress compiler warnings. "
Documentation
At this point, I would recommend that you check this message core-data-scalars .
Hope I helped.
source share