Core Data executeFetchRequest throws NSGenericException (Collection was mutated while being enumerated)

后端 未结 4 1533
忘掉有多难
忘掉有多难 2021-02-09 13:04

I\'m developing a iPhone app with Core Data. All user data should be synchronized with our servers. For this purpose I created a subclass of NSOperation witch loads new data fro

4条回答
  •  迷失自我
    2021-02-09 13:26

    I had the same problem... It was solved because I was using the managedObjectContext that was created on the main thread on a background thread. The solution was to create a different ManagedObjectContext on the background thread, and use the regular persistentStoreCoordinator... it worked fine after that!

提交回复
热议问题