Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.3 KB

README.md

File metadata and controls

41 lines (28 loc) · 1.3 KB

UBICoreData

CI Status Version License Platform

UBICoreData is based on NLCoreData. This library can use more than one store.

Requirements

iOS8.0 or later
Xcode7.1 or later
ARC

Usage

// Make data store
NSURL *storeURL = <Your Store URL>
UBICoreDataStore *dataStore = [[UBICoreDataStore alloc] initWithModelName:@"YourModelName" storeURL:storeURL];

NSManagedObjectContext *context = dataStore.mainContext;

Person *person = [Person insertInContext:context];
person.name = @"Ubi Taro";

Person *samePerson = [Person fetchSingleInContext:context predicate:@"name == 'Ubi Taro'"];

// Save to persistent store
[context saveToPersistentStore];

Installation

UBICoreData is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'UBICoreData'