lipo 终端具体操作

想查看.framework库或者.a库支持的架构:

1.打开终端,在项目里面找到你所想知道库,点击右键 show in Finder,找到这个库的上层的文件夹,然后在 终端:cd 这个文件夹的路径(或者直接cd 拖入.frameWork这层文件夹进入终端)

2.然后想查看库架构支持,lipo -info xxx.framework/xxx (注意:xxx是你的FrameWork名称)

然后你就可以看到输出的结果:Architecuturee in the fat file: xxx.framework/xxx are: i386  x86_64 armv7  arm64

3.想拆分多个架构的支持:如AipBase.framework

# 移除x86_64, i386lipo -remove x86_64 AipBase.framework/AipBase -o AipBase.framework/AipBaselipo -remove i386 AipBase.framework/AipBase -o AipBase.framework/AipBase# 再次查看该库架构支持lipo -info AipBase.framework/AipBase # Architectures in the fat file: AipBase are: armv7 armv7s arm64(输出结果)

4.分离armv7 arm64,或者armv7s

lipo AipBase.framework/AipBase -thin arm64 -output AipBase.framework/AipBase-arm64

lipo AipBaseframework/AipBase -thin armv7 -output AipBase.framework/AipBase-armv7

lipo AipBase.framework/AipBase -thin armv7s -output AipBase.framework/AipBase-armv7s

5.合并分离出的两种或几种架构

lipo -create AipBase.framework/AipBase-armv7 AipBase.framework/AipBase-arm64 AipBase.framework/AipBase-arm7s -output AipBase.framework/AipBase

6.再输出看看生成的framework架构是否符合你的要求

lipo -info AipBase.framework/AipBase

显示 Architectures in the fat file:AipBase are: armv7 armv7s arm64

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容