SweetCoreData
NSManagedObjectContext
Drop entity
let context = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)
context.dropEntity("User")
Count entity
let context = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)
let count = context.countEntity("User")
Fetch entity (with generics)
let context = NSManagedObjectContext(concurrencyType: .MainQueueConcurrencyType)
let users: [User] = context.fetchEntity("User")
Installation
SweetCoreData is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SweetCoreData'
SweetCoreData is also available through Carthage. To install it, simply add the following line to your Cartfile:
github "bakkenbaeck/SweetCoreData"
License
SweetCoreData is available under the MIT license. See the LICENSE file for more info.
Author
Bakken & Bæck, @bakkenbaeck