This repository has been archived by the owner on Jun 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Using GVRDataManagerConfiguration
Sebastian Owodziń edited this page Mar 28, 2015
·
1 revision
// default configuration (single SQLite store & merged models from main bundle)
GVRDataManagerConfiguration *configuration = [GVRDataManagerConfiguration defaultConfiguration];
GVRDataManager *dataManager = [[GVRDataManager alloc] initWithConfiguration:configuration];
// single SQLite store configuration (single SQLite store & merged models from main bundle)
GVRDataManagerConfiguration *configuration = [GVRDataManagerConfiguration singleSQLiteStoreConfiguration];
GVRDataManager *dataManager = [[GVRDataManager alloc] initWithConfiguration:configuration];
// single binary store configuration (single binary store & merged models from main bundle)
GVRDataManagerConfiguration *configuration = [GVRDataManagerConfiguration singleBinaryStoreConfiguration];
GVRDataManager *dataManager = [[GVRDataManager alloc] initWithConfiguration:configuration];
// single in-memory store configuration (single in-memory store & merged models from main bundle)
GVRDataManagerConfiguration *configuration = [GVRDataManagerConfiguration singleInMemoryStoreConfiguration];
GVRDataManager *dataManager = [[GVRDataManager alloc] initWithConfiguration:configuration];
GVRDataManagerConfiguration *configuration = [GVRDataManagerConfiguration defaultConfiguration];
// bundles array to look up models
configuration.modelBundles = @[ ... ];
// models array to combine
configuration.models = @[ ... ];
// persistent stores array to use
configuration.persistentStores = @[
@{
GVRDataManagerConfiguration_PersistentStoreURLKey: [[GVRDataManager applicationDocumentsDirectory] URLByAppendingPathComponent:@"gloverPersistedEntities.sqlite"],
GVRDataManagerConfiguration_PersistentStoreTypeKey: NSSQLiteStoreType,
GVRDataManagerConfiguration_PersistentStoreConfigurationKey: @"PersistedEntities"
},
@{
GVRDataManagerConfiguration_PersistentStoreTypeKey: NSInMemoryStoreType,
GVRDataManagerConfiguration_PersistentStoreConfigurationKey: @"InMemoryEntities"
}
]
GVRDataManager *dataManager = [[GVRDataManager alloc] initWithConfiguration:configuration];