Enumeration

NSAttributeType

The possible types of Core Data attributes.

Declaration

enum NSAttributeType : UInt

Overview

Core Data supports the following attribute types, which explicitly distinguish between bit sizes to ensure data store independence. For some types, a scalar option is available.

Attribute Type

Type

Scalar Type

Scalar by Default?

Integer 16

NSNumber

Int16

yes

Integer 32

NSNumber

Int32

yes

Integer 64

NSNumber

Int64

yes

Double

NSNumber

Double

yes

Float

NSNumber

Float

yes

Boolean

NSNumber

Bool

yes

Date

NSDate

TimeInterval

no

Decimal

NSDecimalNumber

NSDecimalNumber

no

UUID

UUID

UUID

no

URI

URL

String

String

Binary Data

Data

Transformable

NSObject

Undefined

Topics

Attribute Types

case undefinedAttributeType

An undefined attribute type.

case integer16AttributeType

A 16-bit signed integer attribute.

case integer32AttributeType

A 32-bit signed integer attribute.

case integer64AttributeType

A 64-bit signed integer attribute.

case decimalAttributeType

An NSDecimalNumber attribute.

case doubleAttributeType

A double attribute.

case floatAttributeType

A float attribute.

case stringAttributeType

An NSString attribute.

case booleanAttributeType

A Boolean attribute.

case dateAttributeType

An NSDate attribute.

case binaryDataAttributeType

An NSData attribute.

case transformableAttributeType

An attribute that uses a value transformer.

case objectIDAttributeType

The object ID attribute.

case URIAttributeType

A URI attribute.

case UUIDAttributeType

A UUID attribute.

See Also

Attributes and Relationships

class NSPropertyDescription

A description of a property of a Core Data entity.

class NSAttributeDescription

A description of an attribute of a Core Data entity.

class NSRelationshipDescription

A description of a relationship of a Core Data entity.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software