Scalar type in Managed Object only works for IPhone 5

馋奶兔 提交于 2019-12-03 00:32:20

When you use scalar properties you have to provide implementations of getters and setters for those properties by yourself, as described in documentation:

"You can declare properties as scalar values, but for scalar values Core Data cannot dynamically generate accessor methods—you must provide your own implementations (see “Managed Object Accessor Methods”). Core Data automatically synthesizes the primitive accessor methods (primitiveLength and setPrimitiveLength:), but you need to declare them to suppress compiler warnings."

Documentation

At this place I would recommend you to check this post core-data-scalars.

I hope I have helped.

This is not true, scalars have been supported in Core Data out of the box for a long time. You do not have to implement custom accessors as many blog posts out there indicate.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!