且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS中的框架内部包含静态或动态库

更新时间:2023-01-02 11:38:26

很容易确定文件扩展名何时显式

It is simple determine when a file extension is explicit

  • .a-静态库
  • .dylib-动态库
  • .a - static library
  • .dylib - dynamic library

您可以使用 file 命令

you can use file command

file /some_path/<framework_name>.framework/<framework_name>

//possible results
current ar archive random library //static library
dynamically linked shared library //dynamic library

可以在构建设置中更改它Mach-O type [关于] Static Library targetDynamic library,将生成.a文件,file命令显示dynamically linked shared library,但它将是静态库

It is possible to change it in Build Settings a Mach-O type[About] from Static Library target to Dynamic library and .a file will be generated, file command show you dynamically linked shared library but it will be static library

[词汇]
[静态与动态框架]