Cryptic error from Core Data: NSInvalidArgumentException, reason: referenceData64 only defined for abstract class

I have the same issue. It works for smaller data sets, but for larger sets I get “_referenceData64 only defined for abstract class” errors. There’s no abstract entities in my model. EDIT: I think I got this resolved. The issue in my case was a confusion on my part re threads. Here’s the guidelines I … Read more

What does the Indexed Property of a CoreData attribute do?

I would recommend to read this on indexes: http://en.wikipedia.org/wiki/Index_(database).  Simply put, a database engine creates a new structure which keeps the indexed column (which corresponds to a property) sorted and a link to the corresponding row for each entry (primary key). This allows for faster searches (since search in ordered lists is faster than in … Read more

Xcode 6 iOS 8 iCloud core data setup

iOS 8 Solution: OK…then….lol. I think I solved it. New discovery. After skimming through this page: http://www.tuaw.com/2014/09/17/psa-do-not-upgrade-to-icloud-drive-during-ios-8-installation/ It says: iCloud Drive is Apple’s new and improved iCloud syncing and file storage feature that allows you to share documents between your iOS 8 devices and your Mac running OS X 10 Yosemite. So, I decided to … Read more

Can multiple (two) persistent stores be used with one object model, while maintaining relations from one to the other?

The answer is yes. @Caleb points to the right resources, but getting it to work is still quite awkward. I thought I’d place a resumé here: For two NSPersistentStore instances to share the same model, you have to add a configuration to your model, which is a string-named subset of the entities: In the model, … Read more

Core Data and threads / Grand Central Dispatch

Here’s a good example for you to try. Feel free to come back if you have any questions: self.mainThreadContext… // This is a reference to your main thread context NSPersistentStoreCoordinator *mainThreadContextStoreCoordinator = [self.mainThreadContext persistentStoreCoordinator]; dispatch_queue_t request_queue = dispatch_queue_create(“com.yourapp.DescriptionOfMethod”, NULL); dispatch_async(request_queue, ^{ // Create a new managed object context // Set its persistent store coordinator NSManagedObjectContext … Read more

Core Data NSPredicate checking for BOOL value

Based on Apple Document Here, we can use the following two methods to compare Boolean: NSPredicate *newPredicate = [NSPredicate predicateWithFormat:@”anAttribute == %@”,[NSNumber numberWithBool:aBool]]; NSPredicate *testForTrue = [NSPredicate predicateWithFormat:@”anAttribute == YES”]; However, the above predicate cannot get out the ones with empty anAttribute. To deal with an empty attribute, you need the following method according to … Read more

Core Data, NSPredicate and to-many key

To test for an empty relationship you should compare the count of the to-many key to zero. [NSPredicate predicateWithFormat:@”excludedOccurrences.@count == 0″]; As for your subpredicates, be aware that you can only have one of either the ALL or ANY modifiers in your final predicate, although you can use that modifier multiple times throughout the predicate. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)