CoreData: “Dangling reference to an invalid object.” error

后端 未结 9 2108
余生分开走
余生分开走 2021-01-01 11:44

I\'m working on a Cocoa-Touch app, it uses CoreData and has some NSPersistentObject subclasses generated by the XCode model editor.

I\'ve noticed that recently, when

9条回答
  •  旧巷少年郎
    2021-01-01 12:47

    This question was asked a while back, but I just ran into it. It was not due in my case to a improperly set relationship technically. It was due to the object being set created in a different context, note not on a different thread just a different context on the same thread.

    So look for threading issues if you are doing anything with thread with Core Data.

提交回复
热议问题