How to fix app (using coredata) freeze issue on iOS12

565 views Asked by At

I have been working in an app. Its using core data and magical record library. And it was working fine in iOS 11.

But in iOS 12 the app is randomly getting freeze and its not only freeze but a deadlock. In order to use the app again the only way is to kill and run again.

whenever I am debugging and it freeze I pause the thread to check which method is currently executing. Every time its related to coredata. Sometimes it stuck on executeFetchRequest method. Sometimes while saving data in local db.

I think there are some other developers as well who are facing the same issue For reference :- https://github.com/magicalpanda/MagicalRecord/issues/1331

I have tried some solutions for it like :-

• Instead of using default context using privateQueueContext and setting its parent the default context. • Tried performBlockAndWait as suggested in some threads. But I am not able to fix it. Reason for asking this question here is only to have the vision clear which way to proceed.

Thanks,

0

There are 0 answers