Unrecognized selector calling category method in static iOS library

◇◆丶佛笑我妖孽 提交于 2019-12-03 11:21:23

Your 3rd party framework is probable using a category on a existing (apple) class. But to load/find the category you need to add the -ObjC flag in the build settings under Other Linker Flags

Basheer_CAD

Pfitz answer is great, but this will cause the compiler to load a bunch of unused binaries to your project which is not what you want. Please refer to this answer to know why https://stackoverflow.com/a/22264650/1363997

Here is the best solution:

1) select your project target from the left panel (the folders navigator)
2) select "Build Phases" tap
3) expand "Compile Sources" cell
4) hit the plus button at the bottom and then add your category's .m file

Done!

Note: you have to search for the file by navigating through the folder by your self, don't type the file's name in the search field

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