连接的静态库有库类使用category时。。。

When using a static library which includes categories we will also have to add the “-ObjC” flag to the “Other Linker Flags” build setting. This will force the linker to load all objective-c classes and categories from the library. If the library contains only categories “-all_load” or “-force_load” may be needed as well. See Technical Q&A QA1490 for a more detailed explanation of these settings.

当静态库有库自己使用的category时,应当把静态库配置Build Settings\Linking\Other Linker Flags\里加入-all_load和-ObjC,

而使用此静态库的app需要配置Build Settings\Linking\Other Linker Flags\里加入-ObjC。

原文地址:https://www.cnblogs.com/xiaouisme/p/2348761.html