Inherits from NSObject
Declared in RKManagedObjectSeeder.h
RKManagedObjectSeeder.m

Overview

Provides an interface for generating a seed database suitable for initializing a Core Data backed RestKit application. The object seeder loads files from the application’s main bundle and processes them with the Object Mapper to produce a database on disk. This file can then be copied into the main bundle of an application and provided to RKManagedObjectStore at initialization to start the app with a set of data immediately available for use within Core Data.

Tasks

Class Methods

generateSeedDatabaseWithObjectManager:fromFiles:

Generates a seed database using an object manager and a null terminated list of files. Exits the seeding process and outputs an informational message

+ (void)generateSeedDatabaseWithObjectManager:(RKObjectManager *)objectManager fromFiles:(NSString *)fileName

Declared In

RKManagedObjectSeeder.h

objectSeederWithObjectManager:

Returns an object seeder ready to begin seeding. Requires a fully configured instance of an object manager.

+ (RKManagedObjectSeeder *)objectSeederWithObjectManager:(RKObjectManager *)objectManager

Declared In

RKManagedObjectSeeder.h

Instance Methods

finalizeSeedingAndExit

Completes a seeding session by persisting the store, outputing an informational message and exiting the process

- (void)finalizeSeedingAndExit

Declared In

RKManagedObjectSeeder.h

seedObjectsFromFile:toClass:keyPath:

Seed the database with objects from the specified file. Optionally use the specified mappable class and keyPath to traverse the object graph before seeding

- (void)seedObjectsFromFile:(NSString *)fileName toClass:(Class<RKObjectMappable>)nilOrMppableClass keyPath:(NSString *)nilOrKeyPath

Declared In

RKManagedObjectSeeder.h

seedObjectsFromFiles:

Seed the database with objects from the specified file(s). The list must be terminated by nil

- (void)seedObjectsFromFiles:(NSString *)fileName

Declared In

RKManagedObjectSeeder.h