“unrecognized selector sent to class” when calling category method from a library

前端 未结 2 1335
孤城傲影
孤城傲影 2021-02-06 01:33

Problem

This question may seem a bit long, but I try to give as much information as possible, since I am really staggered by this.

I am currently working an a

相关标签:
2条回答
  • 2021-02-06 01:50

    I suspect you have run into a known problem of categories embedded in static libraries.

    If I am right, try to compile with the linker flags -ObjC (and if that is not enough, also -all_load) and your problem should disappear.

    0 讨论(0)
  • 2021-02-06 01:51

    Even though the answer is already selected, I wish the solution to my issue was here, as simple as it may be. Be sure to check that your class is properly checked in the Target Membership field under the File Inspector pane. If you fail to do so then it's only natural to receive the unrecognized selector sent to class error.

    0 讨论(0)
提交回复
热议问题