Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit 2bf5205

Browse files
committed
0.12.0
1 parent 6e70235 commit 2bf5205

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CoreDataKit.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "CoreDataKit"
3-
s.version = "0.11.0"
3+
s.version = "0.12.0"
44
s.license = "MIT"
55

66
s.summary = "CoreDataKit makes common operations on objects and importing into CoreData a breeze."

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ class Car: NSManagedObject, NamedManagedObject {
4747

4848
From here you are able to use the shared stack. For example to create and save an entity, this example performs a block an a background context, saves it to the persistent store and executes a completion handler:
4949
```swift
50-
CDK.performBlockOnBackgroundContext({ context in
50+
CDK.performOnBackgroundContext(block: { context in
5151
do {
5252
let car = try context.create(Car.self)
5353
car.color = "Hammerhead Silver"
5454
car.model = "Aston Martin DB9"
5555

56-
return .SaveToPersistentStore
56+
return .saveToPersistentStore
5757
}
5858
catch {
59-
return .DoNothing
59+
return .doNothing
6060
}
6161
}, completionHandler: { result in
6262
do {
@@ -73,16 +73,16 @@ CDK.performBlockOnBackgroundContext({ context in
7373

7474
If you prefer using promises, instead of the callback style of this library, you can use the [Promissum](https://github.com/tomlokhorst/Promissum) library with CoreDataKit. Using the [CoreDataKit+Promise](https://github.com/tomlokhorst/Promissum/blob/develop/extensions/PromissumExtensions/CoreDataKit%2BPromise.swift) extension, the example from above can be rewritten as such:
7575
```swift
76-
let createPromise = CDK.performBlockOnBackgroundContextPromise { context in
76+
let createPromise = CDK.performOnBackgroundContextPromise { context in
7777
do {
7878
let car = try context.create(Car.self)
7979
car.color = "Hammerhead Silver"
8080
car.model = "Aston Martin DB9"
8181

82-
return .SaveToPersistentStore
82+
return .saveToPersistentStore
8383
}
8484
catch {
85-
return .DoNothing
85+
return .doNothing
8686
}
8787
}
8888

0 commit comments

Comments
 (0)