Magical Record First Step

Hi, do you enjoy iOS programming?
Database is one of the big topics.

Core Data is nice wrapper of SQLite. To use this, we can manage data as object in program.
Magical Record is easier than pure Core Data programming.
Basically, we don’t care about context and other connection code to use Magical Record.

Sources

Let’s access MagicalRecord and download all files.
Unzip and copy Magical Record directory into your project. That’s all.

xcdatamodeld

Create model definition file(xcdatamodeld). This is same as pure Core Data.
Core Data file is explained in CoreData(File xcdatamodeld).

I created Model.xcdatamodeld under my project.

Model

Model file(data object) is same as Core Data. Create NSManagedObject using XCode.

AppDelegate

AppDelegate becomes so simple.
Add one line to your application code.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    [MagicalRecord setupCoreDataStackWithStoreNamed:@"Model"];
    
    return YES;
}

This is first step of Magical Record. Next is DAO.