NSMergeConflict on iOS7

后端 未结 6 1926
时光取名叫无心
时光取名叫无心 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 02:01

    Using Xcode 6.3.2 with Apple Watchkit extension and I got this same error when trying to make multiple updates and saves. The setMergePolicy solved the problem and here are the swift code:

    context.mergePolicy = NSMergeByPropertyObjectTrumpMergePolicy
    

    Make sure to put the above line before the context.save command.

提交回复
热议问题