- You need cocoapods installed on you mac.
Install pods http://cocoapods.org/
pod 'CoreDataLite', '~> 0.0'
This library provides a lighweight boilerplate code for CoreData in objective-c.
The code below shows how to get instance of CoreDatabaseInterface
[[CoreDataManager sharedManager] setupCoreDataWithKey:self.dbName storeKey:@"dbName" objectModelIdentifier:@"databaseIdentifier"];
CoreDatabaseInterface* coreDatabaseInterface = [[CoreDataManager sharedManager] getCoreDataInterfaceForKey:@"dbName"];
CoreDataManager is a singleton class which holds instances of CoreDatabaseInterface in a dictionary against a key, which has to be same as database name. This ensures that two database of similar name are not created.
CoreDatabaseInterface has methods to return back
- NSManagedObjectContext on private queue.
- NSPersistentStoreCoordinator
- NSManagedObjectModel
These methods can be used to carry out operations on CoreData.
Other than above, the CoreDatabaseInterface also provides
- Serial Queue
- Concurrent Queue, which can be used to run queries in serial or parallel.
We'll love contributions, please report bugs in the issue tracker, create pull request (on branch develop
) and suggest new great features (also in the issue tracker).
CoreDataLite available under the MIT license, so feel free to use it in commercial and non-commercial projects.
Mudit Krishna Mathur [email protected]
Prabodh Prakash [email protected]