uimanageddocument

Core Data managed object does not see related objects until restart Simulator

梦想与她 提交于 2019-11-27 13:48:05
Got a Stumper (at least for me). I am using iOS 5.0 w/ ARC, and Core Data inside of UIManagedDocument. I have an Entity (Group) with a to-many relationship (called people) to entity (Person). When I add a new Group, and add then a new Person (setting the person's .group relationship to the new group), I cannot retrieve the related people using a predicate on the Person entity where ("group == %@", myGroup). I also tried using the Group's addPerson setter. If I shut down XCode simulator and rerun it, it recognizes the relationship that was created in the previous run, I can even add new people

Bug in iPhone Simulator 5.1 with Xcode 4.5 using UIManagedDocument

老子叫甜甜 提交于 2019-11-27 12:32:37
问题 I have a very weird problem I've spent the last two days trying to solve... I had a piece of code that was working perfectly fine on Xcode 4.4 and iOS 5.1 Simulator, using the 5.1 SDK. After I updated to Xcode 4.5 and the 6.0 SDK, my code stopped working in the iOS 5.1 Simulator... even though it works perfectly fine in the iOS 6.0 Simulator. Was there any change I'm not aware of? This is the code: - (void)useDocument { if (![[NSFileManager defaultManager] fileExistsAtPath:[self.database

Core Data managed object does not see related objects until restart Simulator

三世轮回 提交于 2019-11-26 18:19:23
问题 Got a Stumper (at least for me). I am using iOS 5.0 w/ ARC, and Core Data inside of UIManagedDocument. I have an Entity (Group) with a to-many relationship (called people) to entity (Person). When I add a new Group, and add then a new Person (setting the person's .group relationship to the new group), I cannot retrieve the related people using a predicate on the Person entity where ("group == %@", myGroup). I also tried using the Group's addPerson setter. If I shut down XCode simulator and

Core Data NSPredicate “deleted == NO” does not work as expected

萝らか妹 提交于 2019-11-26 15:33:53
I am using UIManagedDocument with Parent Child context. In my child context I do the following Code 1 NSSet *results = [self.event.memberships filteredSetUsingPredicate:[NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) { return ([[evaluatedObject deleted] boolValue] == NO); }]]; Above code returns the expected results (only Not deleted members for the event). Code 2 But this code does not. It fetches all records. NSPredicate *predicate = [NSPredicate predicateWithFormat:@"deleted == NO"]; NSSet *results = [self.event.memberships filteredSetUsingPredicate

Core Data and iOS 7: Different behavior of persistent store

巧了我就是萌 提交于 2019-11-26 15:05:15
I'm preparing an update for a Core Data based app for fixes with iOS 7. I use Xcode 5 and iOS 7 SDK GM. However I realized a different behavior of the persistent store (which is a UIManagedDocument ): Prior to iOS 7 builds there was only one file persistentStore in the documents folder (sometimes there was a second one persistentStore-journal ). In iOS 7 builds (clean installation) there are now three files for the persistent store: persistentStore persistentStore-wal and persistentStore-shm Did Apple change the journal mode by default to WAL now? I wonder if there is an impact on my app

Core Data and iOS 7: Different behavior of persistent store

我的梦境 提交于 2019-11-26 04:12:33
问题 I\'m preparing an update for a Core Data based app for fixes with iOS 7. I use Xcode 5 and iOS 7 SDK GM. However I realized a different behavior of the persistent store (which is a UIManagedDocument ): Prior to iOS 7 builds there was only one file persistentStore in the documents folder (sometimes there was a second one persistentStore-journal ). In iOS 7 builds (clean installation) there are now three files for the persistent store: persistentStore persistentStore-wal and persistentStore-shm