“[something copyWithZone:]: unrecognized selector sent to instance” when using Bindings / Core Data

前端 未结 8 1686
情深已故
情深已故 2020-12-28 13:49

(self asking and self-answering because I spent hours on the web looking for this, and most of the resources all say \"I solved it in the end\" without giving an explanation

8条回答
  •  暖寄归人
    2020-12-28 14:11

    I would also like to post here because I had a similar issue with the same type of thing

    empty defined object:

    Wrong code:

    @property (nonatomic, copy, readwrite) MSender * sender;
    

    this should trow a compile error because with reference counting Xcode has no idea how to copy my object. Instead it fails at run time...

    Write code:

    @property (nonatomic, strong, readwrite) MSender * sender;
    

    Hope it helps someone.

提交回复
热议问题