Core Data is Apple's framework for managing and persisting data in iOS and macOS applications. It provides objects for managing data models (NSManagedObjectModel), object contexts (NSManagedObjectContext), and connections to persistent stores like SQLite (NSPersistentStoreCoordinator, NSPersistentStore). Core Data graphs and saves managed objects, handling all the complexities of object relationships and concurrency. Developers can customize data storage through entities, attributes, relationships in the data model and by choosing XML, SQLite, binary, or in-memory storage formats.
Introduction to Core Data - Jason ShapiroMobile March
The document provides an introduction to Core Data for iOS. It discusses options for data persistence in iOS like the file system, networked data stores, SQLite, and Core Data. It describes Core Data as an object-oriented API for managing object graphs and models that typically uses SQLite for storage. It outlines the main classes in the Core Data architecture: Managed Objects, Managed Object Context, Managed Object Model, Persistent Store Coordinator, and Persistent Store.
Core Data allows developers to work with Swift objects and persist them to storage like SQLite. It provides an object graph and change tracking system so objects can be saved, retrieved, and queried. The Core Data stack includes managed objects, managed object contexts, and a persistent store coordinator that interacts with the backend store. Entities in a data model define the structure and relationships of persisted objects.
NSUserDefaults allows storing small amounts of user preference data, but should not be used for sensitive information. The Keychain can securely store passwords and other sensitive data. Files can be saved within an app's sandboxed directories like Documents, Library, and Caches. Entire object graphs can be encoded and archived using NSCoding, while Core Data provides a full object graph and database functionality with querying, versions, and more.
Core Data is Apple's framework for managing and persisting data in iOS and macOS applications. It provides objects for managing data models (NSManagedObjectModel), object contexts (NSManagedObjectContext), and connections to persistent stores like SQLite (NSPersistentStoreCoordinator, NSPersistentStore). Core Data graphs and saves managed objects, handling all the complexities of object relationships and concurrency. Developers can customize data storage through entities, attributes, relationships in the data model and by choosing XML, SQLite, binary, or in-memory storage formats.
Introduction to Core Data - Jason ShapiroMobile March
The document provides an introduction to Core Data for iOS. It discusses options for data persistence in iOS like the file system, networked data stores, SQLite, and Core Data. It describes Core Data as an object-oriented API for managing object graphs and models that typically uses SQLite for storage. It outlines the main classes in the Core Data architecture: Managed Objects, Managed Object Context, Managed Object Model, Persistent Store Coordinator, and Persistent Store.
Core Data allows developers to work with Swift objects and persist them to storage like SQLite. It provides an object graph and change tracking system so objects can be saved, retrieved, and queried. The Core Data stack includes managed objects, managed object contexts, and a persistent store coordinator that interacts with the backend store. Entities in a data model define the structure and relationships of persisted objects.
NSUserDefaults allows storing small amounts of user preference data, but should not be used for sensitive information. The Keychain can securely store passwords and other sensitive data. Files can be saved within an app's sandboxed directories like Documents, Library, and Caches. Entire object graphs can be encoded and archived using NSCoding, while Core Data provides a full object graph and database functionality with querying, versions, and more.