magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.8k forks source link

Magical Record Clear Cache For App Extension #1268

Closed souvickcse closed 6 years ago

souvickcse commented 7 years ago

I am using magical record for doing the coredata tasks for my mac application which has Finder Extension. I am creating app group for using same coredata table in main app and app extension. But the problem I am facing that: I am updating some values in the main app, but the changes are not showing at the app extension, it only shows the updated data after some time, and if i restart the app extesion. So I am guessing it is keeping some cache. How to fix it so that the finder extension get latest data at fetch. I have done [[NSManagedObjectContext MR_defaultContext] setStalenessInterval:0.0]; but it is still not working. And I am not sure using [NSManagedObjectContext MR_resetDefaultContext] will fix this issue, everytime I call this function it gives error, so i am sure that i am using this function not in a proper place or not properly. Is there any way to fix this? http://stackoverflow.com/q/40206743/2246798