Other Linker Flags=-ObjC

 

-all_load Loads all members of static archive libraries.

-ObjC Loads all members of static archive libraries that implement an Objective-C class or category.

-force_load (path_to_archive) Loads all members of the specified static archive library. Note: -all_load forces all members of all archives to be loaded. This option allows you to target a specific archive.

翻译过来就是-all_load就是会加载静态库文件中的所有成员,

-ObjC就是会加载静 态库文件中实现一个类或者分类的所有成员,

-force_load(包的路径)就是会加载指定路径的静态库文件中的所有成员。

所以对于使用runtime 时候的反射调用的方法应该使用这三个中的一个进行link,以保证所有的类都可以加载到内存中供程序动态调用

 

相关文章:

  • 2022-12-23
  • 2021-07-27
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2018-06-25
猜你喜欢
  • 2021-12-27
  • 2021-08-23
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2021-04-21
  • 2022-12-23
相关资源
相似解决方案