Note that there are some explanatory texts on larger screens.

plurals
  1. PONSFetchRequest - Includes Pending Changes
    text
    copied!<p>I'm having issues with my NSFetchedResultsController, which seem to be fixed by turning IncludesPendingChanges on, and this worries me. <strong>(I've found this to not be true, including pending changes does not help.)</strong></p> <p>What happens is that my Fetched Results Controller correctly fetches and displays my objects on a full API refresh. Stepping through, I have confirmed that this full API refresh's temporary context is saved and merged without error. </p> <p>However, if I then return to a view which does this same fetch request from a different navigation flow, only one partially complete object is returned and displayed, rather than the complete set of objects. If I then do a full API Refresh at this point, the refresh displays the correct objects.</p> <p>I believe my issue may be that mergeChangesFromContextDidSaveNotification is not propagating to the main context, but from my logs and stepping through, it seems to me that it is saving correctly. I'm not sure where to go from here. While IncludesPendingChanges fixes the symptom, I don't believe it fixes the underlying issue.</p> <p>As some added information, I'm using this framework for my Core Data Management: <a href="https://github.com/vokalinteractive/CoreDataManager-iOS" rel="nofollow">https://github.com/vokalinteractive/CoreDataManager-iOS</a></p> <p>I am turning on includesPendingChanges by adding on line 156 of VIFetchedResultsController.m </p> <pre><code> [fetchRequest setIncludesPendingChanges:YES] </code></pre> <p><strong>Edit</strong> Whatever fluke caused me to believe includesPendingChanges to YES fixed the problem is no longer present. Turns out this project had some seriously hairy memory management, and after spending all day cleaning that up, I'm still not closer to making this work. Still at the same point though, it looks like the changes are not propagating to the main datastore, or aren't sticking. </p> <p>As a hint, like I mentioned in my comment below, even when I specify "includePendingChanges:YES", Logging out my fetched objects with: </p> <pre><code>[self.fetchedResultsController.fetchedObjects description] </code></pre> <p>ends with "includesPendingChanges: NO". Any idea what can cause this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload