ios - NSFetchedResultsController not refreshing when updated from child context -


i feel i've run issue before , plan on digging old code, has got solution this?

for reason, isn't triggering nsfetchedresultscontroller pointed @ parent context update:

[[nsnotificationcenter defaultcenter] addobserverforname:nsmanagedobjectcontextdidsavenotification object:nil queue:nil usingblock:^(nsnotification *note) {     if ([[note object] iskindofclass:[nsmanagedobjectcontext class]] && [[note object] parentcontext])     {         nsmanagedobjectcontext *parentcontext=[[note object] parentcontext];          [parentcontext performblockandwait:^         {             [parentcontext mergechangesfromcontextdidsavenotification:note];          } ];      }  } ]; 

basically, if make bunch of changes child nsmanagedobjectcontext , save context, triggers this. however, data shown nsfetchedresultscontroller prior context merge. if quit app , restart it, shows correct data. kind of annoying, missing , can't remember what.

i tried this: https://github.com/facebook/fbfetchedresultscontroller ... made no difference.

any thoughts appreciated!

it turned out quirk fetched results controller.

nsfetchedresultscontroller watches actual variables on item changes, , not monitor relationship targets or variables on said targets regardless of whether either of these included in predicate passed it. i'd forgotten limitation.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -