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。

相关文章:

  • 2022-01-10
  • 2022-12-23
  • 2022-01-03
  • 2021-09-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
猜你喜欢
  • 2021-12-18
  • 2022-01-06
  • 2021-06-14
  • 2021-11-09
  • 2021-06-04
相关资源
相似解决方案