NSMergeConflict on iOS7

后端 未结 6 1931
时光取名叫无心
时光取名叫无心 2021-02-06 01:29

I have updated my app to support iOS 7 and have been faced with the problem that on one of screens in my [context save]; I get the following error:

         


        
6条回答
  •  野的像风
    2021-02-06 01:44

    I got similar error, and in my case, locking NSPersistentStoreCoordinator worked.

    [context.persistentStoreCoordinator lock];
    [context performBlockAndWait:^{
       // do something
    }];
    [context.persistentStoreCoordinator unlock]
    

    I don't know why it works, but I suspect NSManagedObjectContext's bug. I hope this will help.

提交回复
热议问题