Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Code/CoreData/RKManagedObjectStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,15 @@ static BOOL RKIsManagedObjectContextDescendentOfContext(NSManagedObjectContext *

static NSSet *RKSetOfManagedObjectIDsFromManagedObjectContextDidSaveNotification(NSNotification *notification)
{
NSUInteger count = [[[notification.userInfo allValues] valueForKeyPath:@"@sum.@count"] unsignedIntegerValue];
NSMutableSet *objectIDs = [NSMutableSet setWithCapacity:count];
// fixing the following NEW error: "this class is not key value coding-compliant for the key @count" for iOS 10+
// NSUInteger count = [[[notification.userInfo allValues] valueForKeyPath:@"@sum.@count"] unsignedIntegerValue];
// NSMutableSet *objectIDs = [NSMutableSet setWithCapacity:count];

NSLog([notification.userInfo allValues]);
NSMutableSet *objectIDs =[NSMutableSet new];
for (NSSet *objects in [notification.userInfo allValues]) {
[objectIDs unionSet:[objects valueForKey:@"objectID"]];
if ([objects isKindOfClass:NSSet.class])
[objectIDs unionSet:[objects valueForKey:@"objectID"]];
}
return objectIDs;
}
Expand Down