How can I get OCMock under ARC to stop nilling an NSProxy subclass set using a weak property?

前端 未结 3 1184
夕颜
夕颜 2020-12-31 12:01

Under ARC, I have an object, Child that has a weak property, parent. I\'m trying to write some tests for Child

3条回答
  •  傲寒
    傲寒 (楼主)
    2020-12-31 12:24

    We've been struggling with this same issue and it does indeed have to do with an incompatibility between ARC and weak references to NSProxy derived objects. I would recommend using a pre-processor directive to conditionally compile your weak delegate references to assign within the test suite so you can test them via OCMock.

提交回复
热议问题