I've searched Core Data attribute types but with no success.
When I open my Entity and Attribute there are several types:
etc.
I'm interested if there is some Apple page which explains about every attribute for which type of usage is.
For example I need an attribute type in which I'll be saving strings of about 1000 characters. Which attribute type do I use for this type of insert?
Thanks for help
The NSAttributeDescription
class reference constants section gives:
typedef enum {
NSUndefinedAttributeType = 0,
NSInteger16AttributeType = 100,
NSInteger32AttributeType = 200,
NSInteger64AttributeType = 300,
NSDecimalAttributeType = 400,
NSDoubleAttributeType = 500,
NSFloatAttributeType = 600,
NSStringAttributeType = 700,
NSBooleanAttributeType = 800,
NSDateAttributeType = 900,
NSBinaryDataAttributeType = 1000,
NSTransformableAttributeType = 1800,
NSObjectIDAttributeType = 2000
} NSAttributeType;
You can find the list here, specifically described in the constants section.
Specifically, typedef enum {
NSUndefinedAttributeType = 0,
NSInteger16AttributeType = 100,
NSInteger32AttributeType = 200,
NSInteger64AttributeType = 300,
NSDecimalAttributeType = 400,
NSDoubleAttributeType = 500,
NSFloatAttributeType = 600,
NSStringAttributeType = 700,
NSBooleanAttributeType = 800,
NSDateAttributeType = 900,
NSBinaryDataAttributeType = 1000,
NSTransformableAttributeType = 1800,
NSObjectIDAttributeType = 2000
} NSAttributeType;
This means the types available to you are:
Undefined/transient, short, integer, long, float, double, NSDecimalNumber, NSString, Boolean, NSDate, NSData, Value transformers, and id
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With