Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit b966370

Browse files
author
Luke Stringer
committed
Merge branch '0.6.0'
2 parents 6649c72 + 310ac8a commit b966370

3 files changed

Lines changed: 18 additions & 15 deletions

File tree

Project/Podfile.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ PODS:
33
- AGAsyncTestHelper/Core (= 1.0)
44
- AGAsyncTestHelper/Core (1.0)
55
- OCMock (2.2.4)
6-
- SQKDataKit/ContextManager (0.5.2):
6+
- SQKDataKit/ContextManager (0.6.0):
77
- SQKDataKit/Core
8-
- SQKDataKit/Core (0.5.2)
9-
- SQKDataKit/CoreDataOperation (0.5.2):
8+
- SQKDataKit/Core (0.6.0)
9+
- SQKDataKit/CoreDataOperation (0.6.0):
1010
- SQKDataKit/ContextManager
1111
- SQKDataKit/Core
1212
- SQKDataKit/ManagedObjectExtensions
13-
- SQKDataKit/FetchedCollectionViewController (0.5.2):
13+
- SQKDataKit/FetchedCollectionViewController (0.6.0):
1414
- SQKDataKit/Core
15-
- SQKDataKit/FetchedTableViewController (0.5.2):
15+
- SQKDataKit/FetchedTableViewController (0.6.0):
1616
- SQKDataKit/Core
17-
- SQKDataKit/ManagedObjectController (0.5.2):
17+
- SQKDataKit/ManagedObjectController (0.6.0):
1818
- SQKDataKit/Core
19-
- SQKDataKit/ManagedObjectExtensions (0.5.2):
19+
- SQKDataKit/ManagedObjectExtensions (0.6.0):
2020
- SQKDataKit/Core
2121

2222
DEPENDENCIES:
@@ -31,11 +31,11 @@ DEPENDENCIES:
3131

3232
EXTERNAL SOURCES:
3333
SQKDataKit:
34-
:path: ../SQKDataKit.podspec
34+
:path: "../SQKDataKit.podspec"
3535

3636
SPEC CHECKSUMS:
37-
AGAsyncTestHelper: fc9d44460933d8167ae431f466ab3a09a5121582
38-
OCMock: 6db79185520e24f9f299548f2b8b07e41d881bd5
39-
SQKDataKit: 3ce30031d3a55fed3a8fb1eed020817083a63a6b
37+
AGAsyncTestHelper: 8bcc5f789bd2a8581c3eb58038158ce71f9f0640
38+
OCMock: a6a7dc0e3997fb9f35d99f72528698ebf60d64f2
39+
SQKDataKit: 529742619985d0902d6e361b3088bce0991a8684
4040

41-
COCOAPODS: 0.35.0
41+
COCOAPODS: 0.37.1

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ You should only ever use a single `SQKContextManager` as it maintains the persis
4444
- (void)setupContextManager {
4545
if (!self.contextManager) {
4646
NSManagedObjectModel *model = [NSManagedObjectModel mergedModelFromBundles:nil];
47-
self.contextManager = [[SQKContextManager alloc] initWithStoreType:NSSQLiteStoreType managedObjectModel:model];
47+
self.contextManager = [[SQKContextManager alloc] initWithStoreType:NSSQLiteStoreType
48+
managedObjectModel:model
49+
orderedManagedObjectModelNames:@[ @"DataModelName" ]
50+
storeURL:nil];
4851
}
4952
}
5053
@@ -284,7 +287,7 @@ To use a section index in a `SQKFetchedTableViewController` subclass:
284287

285288
Use an SQKCoreDataOperation when you need to perform work with Core Data off of the main thread.
286289

287-
You need to subclass and must override the `performWorkPrivateContext:` method, which is where you should perform your work with Core Data. The operation will use its `SQKContextManager` to obtain a private managed object context. This is passed to the `performWorkPrivateContext:` method for you to use. When your work is complete call the `completeOperationBySavingContext:` method passing in the private context you have used. This saves the (private) managed object context, merges the changes into main context, and finishes operation.
290+
You need to subclass and must override the `performWorkWithPrivateContext:` method, which is where you should perform your work with Core Data. The operation will use its `SQKContextManager` to obtain a private managed object context. This is passed to the `performWorkPrivateContext:` method for you to use. When your work is complete call the `completeOperationBySavingContext:` method passing in the private context you have used. This saves the (private) managed object context, merges the changes into main context, and finishes operation.
288291

289292
Add the operation to an NSOperationQueue that is not the `mainQueue` so that the computation is performed off the main thread. As a private context is used any insertions, updates, deletions etc. **must be done in a background thread**, and using the correct operation queue will ensure that.
290293

SQKDataKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'SQKDataKit'
4-
s.version = '0.5.2'
4+
s.version = '0.6.0'
55
s.summary = 'Lightweight Core Data helper to reduce boilerplate code.'
66

77
s.license = { :type => 'Custom', :file => 'LICENCE' }

0 commit comments

Comments
 (0)