Class myClass = NSClassFromString("StaticLibyClassName");

StaticLibyClassName是从静态库中实例化一个Class,需要在bulid settings中的Other Linker Flags中添加“-ObjC"标识。否则 myClass 为nil.

还有种坑爹的情况,Build Phases 中没有对应的类.m 文件,当从外部拖入文件时候,虽然勾选了 copy,编译也没有报告错误,但。。。不说了,加进对应的.m文件吧!这个是Xcode的bug

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2021-09-05
猜你喜欢
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案