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

自古美人都是妖i 提交于 2019-12-03 03:06:48

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!