Inherits from NSObject
Declared in RKManagedObjectStore.h
RKManagedObjectStore.m

Tasks

Deleting Store Files

Initializing an Object Store

Retrieving Managed Object Contexts

Properties

cacheStrategy

@property (nonatomic, retain) NSObject<RKManagedObjectCacheing> *cacheStrategy

Declared In

RKManagedObjectStore.h

primaryManagedObjectContext

Retrieves the Managed Object Context for the main thread that was initialized when the object store was created.

@property (nonatomic, retain, readonly) NSManagedObjectContext *primaryManagedObjectContext

Declared In

RKManagedObjectStore.h

Class Methods

deleteStoreAtPath:

Deletes the SQLite file backing an RKManagedObjectStore instance at a given path.

+ (void)deleteStoreAtPath:(NSString *)path

Parameters

path

The complete path to the store file to delete.

Declared In

RKManagedObjectStore.h

deleteStoreInApplicationDataDirectoryWithFilename:

Deletes the SQLite file backing an RKManagedObjectStore instance with a given filename within the application data directory.

+ (void)deleteStoreInApplicationDataDirectoryWithFilename:(NSString *)filename

Parameters

filename

The name of the file within the application data directory backing a managed object store.

Declared In

RKManagedObjectStore.h

objectStoreWithStoreFilename:

Initialize a new managed object store with a SQLite database with the filename specified

+ (RKManagedObjectStore *)objectStoreWithStoreFilename:(NSString *)storeFilename

Declared In

RKManagedObjectStore.h

objectStoreWithStoreFilename:inDirectory:usingSeedDatabaseName:managedObjectModel:delegate:

Initialize a new managed object store backed by a SQLite database with the specified filename, in the specified directory. If no directory is specified, will use the app’s Documents directory. If a seed database name is provided and no existing database is found, initialize the store by copying the seed database from the main bundle. If the managed object model provided is nil, all models will be merged from the main bundle for you.

+ (RKManagedObjectStore *)objectStoreWithStoreFilename:(NSString *)storeFilename inDirectory:(NSString *)directory usingSeedDatabaseName:(NSString *)nilOrNameOfSeedDatabaseInMainBundle managedObjectModel:(NSManagedObjectModel *)nilOrManagedObjectModel delegate:(id)delegate

Declared In

RKManagedObjectStore.h

objectStoreWithStoreFilename:usingSeedDatabaseName:managedObjectModel:delegate:

Initialize a new managed object store backed by a SQLite database with the specified filename. If a seed database name is provided and no existing database is found, initialize the store by copying the seed database from the main bundle. If the managed object model provided is nil, all models will be merged from the main bundle for you.

+ (RKManagedObjectStore *)objectStoreWithStoreFilename:(NSString *)storeFilename usingSeedDatabaseName:(NSString *)nilOrNameOfSeedDatabaseInMainBundle managedObjectModel:(NSManagedObjectModel *)nilOrManagedObjectModel delegate:(id)delegate

Declared In

RKManagedObjectStore.h

Instance Methods

deletePersistantStoreUsingSeedDatabaseName:

This deletes and recreates the managed object context and persistant store, effectively clearing all data

- (void)deletePersistantStoreUsingSeedDatabaseName:(NSString *)seedFile

Declared In

RKManagedObjectStore.h

initWithStoreFilename:

Initialize a new managed object store with a SQLite database with the filename specified @deprecated

- (id)initWithStoreFilename:(NSString *)storeFilename

Declared In

RKManagedObjectStore.h

newManagedObjectContext

Instantiates a new managed object context

- (NSManagedObjectContext *)newManagedObjectContext

Declared In

RKManagedObjectStore.h

objectWithID:

Retrieves a model object from the appropriate context using the objectId
- (NSManagedObject *)objectWithID:(NSManagedObjectID *)objectID

Declared In

RKManagedObjectStore.h

objectsWithIDs:

Retrieves a array of model objects from the appropriate context using
an array of NSManagedObjectIDs
- (NSArray *)objectsWithIDs:(NSArray *)objectIDs

Declared In

RKManagedObjectStore.h

save:

Save the current contents of the managed object store

- (BOOL)save:(NSError **)error

Declared In

RKManagedObjectStore.h