[SDK]区分framwork是静态库还是动态库

命令行进入动态库文件,使用file命令可以看到区别,分别以腾讯分享framwork(静态)和阿里直播framwork(动态)为例展示:

cd TencentOpenAPI.framework
file TencentOpenAPI 

输出

TencentOpenAPI: Mach-O universal binary with 4 architectures: [arm_v7:current ar archive] [arm64]
TencentOpenAPI (for architecture armv7):    current ar archive
TencentOpenAPI (for architecture i386): current ar archive
TencentOpenAPI (for architecture x86_64):   current ar archive
TencentOpenAPI (for architecture arm64):    current ar archive

archive表明这是一个静态库

cd AliyunPlayerSDK.framework
file AliyunPlayerSDK 

输出

AliyunPlayerSDK: Mach-O universal binary with 4 architectures: [i386:Mach-O dynamically linked shared library i386] [arm64]
AliyunPlayerSDK (for architecture i386):    Mach-O dynamically linked shared library i386
AliyunPlayerSDK (for architecture x86_64):  Mach-O 64-bit dynamically linked shared library x86_64
AliyunPlayerSDK (for architecture armv7):   Mach-O dynamically linked shared library arm_v7
AliyunPlayerSDK (for architecture arm64):   Mach-O 64-bit dynamically linked shared library arm64

dynamically linked shared library表明这是一个动态库

你可能感兴趣的:([SDK]区分framwork是静态库还是动态库)