Fetch all records of a type from Core Data in a single line instead of writing verbose fetch requests.
Quickly add, update, or delete stored objects in an iOS or macOS app with minimal boilerplate.
Migrate an older Objective-C app using MagicalRecord to Apple's improved native Core Data APIs.
Project is no longer actively developed, Apple's native Core Data improvements have superseded it.
MagicalRecord is an Objective-C library for iOS and macOS that simplifies working with Core Data, Apple's built-in system for storing and retrieving data on device. Core Data is known for requiring a lot of setup code and verbose fetch requests to do even simple things. MagicalRecord wraps around it to let developers retrieve, create, and delete stored objects with much shorter code. The library was inspired by the Active Record pattern from the Ruby on Rails web framework, where each database table is represented as a class and common operations like find, insert, update, and delete can be done in a single line of code. MagicalRecord brings a similar style to Apple platform development, reducing the boilerplate involved in setting up fetch requests and managing data contexts. Typical use cases include fetching all records of a certain type, finding specific objects by attribute, saving new data, and deleting records. The library still allows developers to customize the underlying fetch request when they need fine-grained control over how data is queried. The project is no longer actively developed. The README states it has been superseded by improvements Apple made to Core Data itself. The last stable release is version 2.4.0, and an experimental 3.0 branch also exists. Both are available via CocoaPods, the dependency manager commonly used in Objective-C and Swift projects. Documentation covers installation, getting started, creating and deleting entities, fetching, saving, and importing data from external sources. Community support is directed to Stack Overflow using the MagicalRecord tag, or to the GitHub issue tracker for confirmed bugs.
← magicalpanda on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.