Core Data is an object graph and persistence framework for modeling, storing, and querying your app's data. You describe your data model with NSManagedObjectModel, NSEntityDescription, and NSAttributeDescription, then fetch and manipulate records using NSFetchRequest, NSAsynchronousFetchRequest, and bulk operations such as NSBatchInsertRequest, NSBatchUpdateRequest, and NSBatchDeleteRequest. To drive table and collection interfaces, NSFetchedResultsController tracks query results and reports changes through NSFetchedResultsControllerDelegate, while migration types like NSMappingModel, NSEntityMigrationPolicy, NSLightweightMigrationStage, and NSCustomMigrationStage evolve your store across versions. The framework also integrates with CloudKit for syncing and with Spotlight through NSCoreDataCoreSpotlightDelegate to make your content searchable.
Persistence Stack 4
The container and coordinator objects that set up and manage your app's Core Data store.
- ClNSPersistentContaineriOS 10.0+An object that encapsulates the Core Data stack, including the model, coordinator, and contexts.
- ClNSPersistentCloudKitContaineriOS 13.0+A container that mirrors a Core Data store to CloudKit to sync data across a user's devices.
- ClNSPersistentStoreCoordinatoriOS 3.0+An object that mediates between managed object contexts and the persistent stores they use.
- ClNSPersistentStoreDescriptioniOS 10.0+An object that describes the configuration and options for a persistent store to be added.
Managed Object Model 16
Types that describe your schema's entities, attributes, relationships, and indexes.
- ClNSManagedObjectModeliOS 3.0+An object that describes an app's schema as a collection of entities and their relationships.
- ClNSManagedObjectModelReferenceiOS 17.0+A reference to a managed object model identified by name and version checksum for staged migration.
- ClNSEntityDescriptioniOS 3.0+An object that describes an entity, including its attributes, relationships, and managed object class.
- ClNSManagedObjectIDiOS 3.0+A compact, persistent identifier that uniquely references a managed object within a store.
- ClNSPropertyDescriptioniOS 3.0+The abstract base class describing a property of an entity, such as an attribute or relationship.
- ClNSAttributeDescriptioniOS 3.0+An object that describes a single attribute of an entity in a managed object model.
- ClNSCompositeAttributeDescriptioniOS 17.0+An object that describes an attribute composed of several underlying attributes within an entity.
- ClNSDerivedAttributeDescriptioniOS 13.0+An object that describes an attribute whose value is computed from an expression over other properties.
- ClNSRelationshipDescriptioniOS 3.0+An object that describes a relationship between two entities in a managed object model.
- ClNSFetchedPropertyDescriptioniOS 3.0+An object that describes a property whose value is the result of a fetch request over related objects.
- ClNSExpressionDescriptioniOS 3.0+A property description that represents a computed value derived from an expression in a fetch request.
- ClNSFetchIndexDescriptioniOS 11.0+An object that describes a fetch index defined on an entity to speed up queries.
- ClNSFetchIndexElementDescriptioniOS 11.0+An object that describes a single property and collation of a fetch index.
- EnNSAttributeTypeConstants that identify the data type of an attribute, such as string, integer, or date.
- EnNSFetchIndexElementTypeiOS 11.0+Constants that specify the storage type of an element within a fetch index.
- EnNSDeleteRuleConstants that specify what happens to related objects when an object is deleted.
Fetching Data 7
Requests and result types for querying records from a store.
- ClNSFetchRequestiOS 3.0+A description of search criteria used to retrieve records from a persistent store.
- ClNSAsynchronousFetchRequestiOS 8.0+A fetch request that executes in the background and reports its results through a completion block.
- ClNSFetchRequestExpressioniOS 3.0+An expression that represents a fetch request as part of a predicate or computed value.
- PrNSFetchRequestResultA protocol adopted by types that can be returned as results of a fetch request.
- StNSFetchRequestResultTypeConstants that specify the kind of result a fetch request returns, such as objects, IDs, or counts.
- ClNSAsynchronousFetchResultiOS 8.0+A result object that holds the records returned by an asynchronous fetch request.
- EnNSManagedObjectContextConcurrencyTypeiOS 5.0+Constants that specify the threading model a managed object context uses.
Driving Table and Collection Views 5
Controllers and protocols that track fetch results and report changes to your interface.
- ClNSFetchedResultsControlleriOS 3.0+A controller that manages the results of a fetch request and reports changes for table and collection views.
- PrNSFetchedResultsControllerDelegateA protocol that receives notifications when a fetched results controller's content changes.
- PrNSFetchedResultsSectionInfoA protocol that provides information about one section of a fetched results controller's results.
- EnNSFetchedResultsChangeTypeiOS 3.0+Constants that identify the kind of change reported by a fetched results controller, such as insert or delete.
- StNSSnapshotEventTypeConstants that identify the kind of snapshot event delivered when a managed object's state changes.
Batch Operations 9
Requests and results that insert, update, or delete many records efficiently without loading them into memory.
- ClNSBatchInsertRequestiOS 13.0+A request that inserts many records directly into the store without loading them into a context.
- ClNSBatchInsertResultiOS 13.0+A result object that reports the outcome of a batch insert request.
- EnNSBatchInsertRequestResultTypeiOS 13.0+Constants that specify what a batch insert request returns, such as status, object IDs, or count.
- ClNSBatchUpdateRequestiOS 8.0+A request that updates many records directly in the store without loading them into a context.
- ClNSBatchUpdateResultiOS 8.0+A result object that reports the outcome of a batch update request.
- EnNSBatchUpdateRequestResultTypeiOS 8.0+Constants that specify what a batch update request returns, such as status, object IDs, or count.
- ClNSBatchDeleteRequestiOS 9.0+A request that deletes many records directly in the store without loading them into a context.
- ClNSBatchDeleteResultiOS 9.0+A result object that reports the outcome of a batch delete request.
- EnNSBatchDeleteRequestResultTypeiOS 9.0+Constants that specify what a batch delete request returns, such as status, object IDs, or count.
Saving and Merging Changes 6
Requests and policies that persist edits and resolve conflicts between contexts and the store.
- ClNSSaveChangesRequestiOS 5.0+A request that asks a persistent store to insert, update, delete, or lock managed objects.
- ClNSMergePolicyiOS 5.0+A policy that resolves conflicts between a managed object context and its persistent store.
- EnNSMergePolicyTypeConstants that identify the built-in policies for resolving save conflicts.
- ClNSMergeConflictiOS 5.0+An object that describes a conflict between an in-memory object and its persisted or cached state.
- ClNSConstraintConflictiOS 9.0+An object that describes a conflict arising from a violated uniqueness constraint during a save.
- ClNSQueryGenerationTokeniOS 10.0+A token that pins a managed object context to a specific generation of the persistent store's data.
Persistent History Tracking 7
Types that record and query the history of changes made to a persistent store.
- ClNSPersistentHistoryChangeRequestiOS 11.0+A request that fetches or purges the recorded history of changes to a persistent store.
- ClNSPersistentHistoryResultiOS 11.0+A result object that holds the transactions, changes, or tokens returned by a history request.
- EnNSPersistentHistoryResultTypeiOS 11.0+Constants that specify what a persistent history request returns, such as transactions or tokens.
- ClNSPersistentHistoryTransactioniOS 11.0+An object that groups the changes recorded together during a single save operation.
- ClNSPersistentHistoryChangeiOS 11.0+An object that describes a single insertion, update, or deletion recorded in persistent history.
- EnNSPersistentHistoryChangeTypeiOS 11.0+Constants that identify whether a history change is an insertion, update, or deletion.
- ClNSPersistentHistoryTokeniOS 11.0+An opaque token that marks a position in a store's persistent history.
CloudKit Integration 5
Types that mirror a Core Data store to CloudKit and report synchronization events.
- ClNSPersistentCloudKitContainerOptionsiOS 13.0+NSPersistentCloudKitContainerOptions provides customization of how NSPersistentCloudKitContainer aligns a given instance of NSPersistentStoreDescription with a CloudKit database.
- StNSPersistentCloudKitContainerSchemaInitializationOptionsOptions that control how the CloudKit schema is initialized for a persistent store.
- ClNSPersistentCloudKitContainerEventRequestiOS 14.0+A request that fetches the history of CloudKit setup, import, and export events.
- ClNSPersistentCloudKitContainerEventResultiOS 14.0+A result object that holds the CloudKit synchronization events returned by an event request.
- EnNSPersistentStoreUbiquitousTransitionTypeConstants that identify the kind of transition a ubiquitous store undergoes during syncing.
Model Migration 10
Types that evolve a persistent store's schema across model versions.
- ClNSMigrationManageriOS 3.0+An object that performs migration of a store from a source model version to a destination version.
- ClNSStagedMigrationManageriOS 17.0+An object that performs a sequence of staged migrations to evolve a store across model versions.
- ClNSMigrationStageiOS 17.0+An abstract base class representing one stage of a staged migration between model versions.
- ClNSLightweightMigrationStageiOS 17.0+A migration stage that infers and applies lightweight schema changes between two model versions.
- ClNSCustomMigrationStageiOS 17.0+A migration stage that performs custom logic to transform data between two model versions.
- ClNSMappingModeliOS 3.0+An object that describes how to map data from a source managed object model to a destination model.
- ClNSEntityMappingiOS 3.0+An object that specifies how instances of a source entity are mapped to a destination entity during migration.
- ClNSPropertyMappingiOS 3.0+An object that specifies how a single property is mapped from a source entity to a destination entity.
- ClNSEntityMigrationPolicyiOS 3.0+A class you subclass to customize how an entity's instances are migrated to a new model version.
- EnNSEntityMappingTypeConstants that specify the kind of mapping applied to an entity during migration.
Custom and Atomic Stores 9
Base classes for implementing your own persistent store backends.
- ClNSPersistentStoreiOS 3.0+An abstract base class that represents a single store managed by a persistent store coordinator.
- ClNSAtomicStoreiOS 3.0+An abstract base class for a persistent store that loads and saves its entire content as a single atomic unit.
- ClNSAtomicStoreCacheNodeiOS 3.0+An object that represents a single managed object's data within an atomic store's in-memory cache.
- ClNSIncrementalStoreiOS 5.0+An abstract base class for a persistent store that loads and saves records incrementally on demand.
- ClNSIncrementalStoreNodeiOS 5.0+An object that holds the property values of a single managed object in an incremental store.
- ClNSPersistentStoreRequestiOS 5.0+An abstract base class for requests sent to a persistent store, such as fetch and save requests.
- EnNSPersistentStoreRequestTypeConstants that identify the kind of request sent to a persistent store.
- ClNSPersistentStoreResultiOS 8.0+An abstract base class representing the result of a request executed against a persistent store.
- ClNSPersistentStoreAsynchronousResultiOS 8.0+A result object that represents the in-progress outcome of an asynchronous persistent store request.
Spotlight Integration 1
Support for indexing Core Data content so it appears in system search.
- ClNSCoreDataCoreSpotlightDelegateiOS 11.0+An object that indexes a Core Data store's content into Spotlight so it appears in system search.
Classes 2
- ClNSManagedObjectiOS 3.0+
- ClNSManagedObjectContextiOS 3.0+
Type Aliases 27
- TyNSPersistentStoreAsynchronousFetchResultCompletionBlock
- Ty__Float16x4_t
- Ty__Float16x8_t
- Ty__Float32x2_t
- Ty__Float32x4_t
- Ty__Float64x2_t
- Ty__Int16x4_t
- Ty__Int16x8_t
- Ty__Int32x2_t
- Ty__Int32x4_t
- Ty__Int64x2_t
- Ty__Int8x16_t
- Ty__Int8x8_t
- Ty__NSConstantString
- Ty__Poly16x4_t
- Ty__Poly16x8_t
Show 11 more
- Ty__Poly64x2_t
- Ty__Poly8x16_t
- Ty__Poly8x8_t
- Ty__Uint16x4_t
- Ty__Uint16x8_t
- Ty__Uint32x2_t
- Ty__Uint32x4_t
- Ty__Uint64x2_t
- Ty__Uint8x16_t
- Ty__Uint8x8_t
- Ty__builtin_ms_va_list