Core Data Constants

This document describes the constants defined in the Core Data framework and not described in a document for an individual class.

Symbols

Constants

Core Data Version Number

Specifies the current Core Data version number.

Core Data Version Numbers

Specify Core Data version numbers.

Error Domain

Constant to identify the SQLite error domain.

Error User Info Keys

Keys in the user info dictionary in errors Core Data creates.

General Error Codes

Error codes that denote a general error.

Migration Error Codes

Error codes related to store migration.

let NSAddedPersistentStoresKey: String

Key for the array of stores that were added.

let NSBinaryExternalRecordType: String

Specifies a binary file format

let NSBinaryStoreType: String

The binary store type.

var NSCoreDataVersionNumber10_10: Doublevar NSCoreDataVersionNumber10_10_2: Doublevar NSCoreDataVersionNumber10_10_3: Doublevar NSCoreDataVersionNumber10_11: Doublevar NSCoreDataVersionNumber10_11_3: Doublevar NSCoreDataVersionNumber10_9: Doublevar NSCoreDataVersionNumber10_9_2: Doublevar NSCoreDataVersionNumber10_9_3: Doublevar NSCoreDataVersionNumber_iPhoneOS_6_1: Doublevar NSCoreDataVersionNumber_iPhoneOS_7_0: Doublevar NSCoreDataVersionNumber_iPhoneOS_7_1: Doublevar NSCoreDataVersionNumber_iPhoneOS_8_0: Doublevar NSCoreDataVersionNumber_iPhoneOS_8_3: Doublevar NSCoreDataVersionNumber_iPhoneOS_9_0: Doublevar NSCoreDataVersionNumber_iPhoneOS_9_2: Doublevar NSCoreDataVersionNumber_iPhoneOS_9_3: Double
let NSDeletedObjectsKey: String

Key for the set of objects that were marked for deletion during the previous event.

let NSEntityNameInPathKey: String

Dictionary key for the entity name extracted from an external record file.

var NSErrorMergePolicy: AnyObject

This policy causes a save to fail if there are any merge conflicts.

let NSExternalRecordExtensionOption: String

Option indicating the file extension to use for Spotlight external record files.

let NSExternalRecordsDirectoryOption: String

Option indicating the directory where Spotlight external record files should be written to.

let NSExternalRecordsFileFormatOption: String

Option to specify the file format of a Spotlight external records.

let NSFetchRequestExpressionType: NSExpression.ExpressionType
let NSIgnorePersistentStoreVersioningOption: String

Key to ignore the built-in versioning provided by Core Data.

let NSInMemoryStoreType: String

The in-memory store type.

let NSInferMappingModelAutomaticallyOption: String

Key to attempt to create the mapping model automatically.

let NSInsertedObjectsKey: String

Key for the set of objects that were inserted into the context.

let NSInvalidatedAllObjectsKey: String

Key that specifies that all objects in the context have been invalidated.

let NSInvalidatedObjectsKey: String

Key for the set of objects that were invalidated.

let NSManagedObjectContextQueryGenerationKey: String
var NSMergeByPropertyObjectTrumpMergePolicy: AnyObject

This policy merges conflicts between the persistent store’s version of the object and the current in-memory version, giving priority to in-memory changes.

var NSMergeByPropertyStoreTrumpMergePolicy: AnyObject

This policy merges conflicts between the persistent store’s version of the object and the current in-memory version, giving priority to external changes.

let NSMigratePersistentStoresAutomaticallyOption: String

Key to automatically attempt to migrate versioned stores.

let NSMigrationDestinationObjectKey: String

Key for the destination object.

let NSMigrationEntityMappingKey: String

Key for the entity mapping object.

let NSMigrationEntityPolicyKey: String

Key for the entity migration policy object.

let NSMigrationManagerKey: String

Key for the migration manager.

let NSMigrationPropertyMappingKey: String

Key for the property mapping object.

let NSMigrationSourceObjectKey: String

Key for the source object.

let NSModelPathKey: String

Dictionary key for the managed object model path (an instance of NSURL) extracted from an external record file.

let NSObjectURIKey: String

Dictionary key for the object URI extracted from an external record file.

var NSOverwriteMergePolicy: AnyObject

This policy overwrites state in the persistent store for the changed objects in conflict.

let NSPersistentStoreConnectionPoolMaxSizeKey: String
let NSPersistentStoreFileProtectionKey: String

Key to represent the protection class for the persistent store.

let NSPersistentStoreForceDestroyOption: String
let NSPersistentStoreOSCompatibility: String

Key to represent the earliest version of the operation system that the persistent store supports.

let NSPersistentStoreRebuildFromUbiquitousContentOption: String

The corresponding value is an NSNumber object representing a boolean that indicates whether the receiver should erase the local store file and rebuild it from the iCloud data in Mobile Documents.

Deprecated
let NSPersistentStoreRemoveUbiquitousMetadataOption: String

The corresponding value is an NSNumber object representing a boolean that indicates whether the receiver should remove all associated ubiquity metadata from a persistent store. You typically use this option during migration or copying to disassociate a persistent store file from an iCloud account.

Deprecated
let NSPersistentStoreTimeoutOption: String

Options key that specifies the connection timeout for Core Data stores.

let NSPersistentStoreUbiquitousContainerIdentifierKey: String

The corresponding value is a string specifying the iCloud container identifier Core Data should pass to url(forUbiquityContainerIdentifier:).

Deprecated
let NSPersistentStoreUbiquitousContentNameKey: String

Option to specify that a persistent store has a given name in ubiquity.

Deprecated
let NSPersistentStoreUbiquitousContentURLKey: String

Option to specify the log path to use for ubiquitous content logs.

Deprecated
let NSPersistentStoreUbiquitousPeerTokenOption: String

The corresponding value is an optionally specified string which will be mixed in to Core Data’s identifier for each iCloud peer. The value must be an alphanumeric string without any special characters, whitespace or punctuation. The primary use for this option is to allow multiple applications on the same peer (device) to share a Core Data store integrated with iCloud. Each application will require its own store file.

Deprecated
let NSPersistentStoreUbiquitousTransitionTypeKey: String

In the NSPersistentStoreCoordinatorStoresWillChange and NSPersistentStoreCoordinatorStoresDidChange userInfo dictionaries, this identifies the type of event. The corresponding value is one of the NSPersistentStoreUbiquitousTransitionType enum values as an NSNumber object.

Deprecated
let NSReadOnlyPersistentStoreOption: String

A flag that indicates whether a store is treated as read-only or not.

let NSRefreshedObjectsKey: String

Key for the set of objects that were refreshed but were not dirtied in the scope of this context.

let NSRemovedPersistentStoresKey: String

Key for the array of stores that were removed.

var NSRollbackMergePolicy: AnyObject

This policy discards in-memory state changes for objects in conflict.

let NSSQLiteAnalyzeOption: String

Option key to run an analysis of the store data to optimize indices based on statistical information when the store is added to the coordinator.

let NSSQLiteManualVacuumOption: String

Option key to rebuild the store file, forcing a database wide defragmentation when the store is added to the coordinator.

let NSSQLitePragmasOption: String

Options key for a dictionary of SQLite pragma settings with pragma values indexed by pragma names as keys.

let NSSQLiteStoreType: String

The SQLite database store type.

let NSStoreModelVersionHashesKey: String

Key to represent the version hash information for the model used to create the store.

let NSStoreModelVersionIdentifiersKey: String

Key to represent the version identifiers for the model used to create the store.

let NSStorePathKey: String

Dictionary key for the store path (an instance of NSURL) extracted from an external record file.

let NSStoreTypeKey: String

The key in the metadata dictionary to identify the store type.

let NSStoreUUIDInPathKey: String

Dictionary key for the store UUID extracted from an external record file.

let NSStoreUUIDKey: String

The key in the metadata dictionary to identify the store UUID.

let NSUUIDChangedPersistentStoresKey: String

Key for an array containing the old and new stores.

let NSUpdatedObjectsKey: String

Key for the set of objects that were updated.

let NSValidateXMLStoreOption: String

A flag that indicates whether an XML file should be validated with the DTD while opening.

let NSXMLExternalRecordType: String

Specifies an XML file format.

let NSXMLStoreType: String

The XML store type.

Object Graph Management Error Codes

These error codes specify Core Data errors related to object graph management.

Persistent Store Error Codes

Error codes related to persistent stores.

Validation Error Codes

Error codes related to validation.