使用终端
lipo -create 真机静态库文件路径 模拟器静态库文件路径 -output 合并后静态库文件路径
注意:静态库文件都是保存在本地电脑,然后再加入到项目工程文件中。如:
真机静态库文件路径:/Users/zhangshaoyu/Desktop/卡片扫描/static-Lib/product/Release-iphoneos/libexidcardios.a
模拟器静态库文件路径:/Users/zhangshaoyu/Desktop/卡片扫描/static-Lib/product/Release-iphonesimulator/libexidcardios.a
合并后静态库文件路径:/Users/zhangshaoyu/Desktop/卡片扫描/static-Lib/product/libexidcardios.a
终端命令:lipo -create /Users/zhangshaoyu/Desktop/卡片扫描/static-Lib/product/Release-iphoneos/libexidcardios.a /Users/zhangshaoyu/Desktop/卡片扫描/static-Lib/product/Release-iphonesimulator/libexidcardios.a -output /Users/zhangshaoyu/Desktop/卡片扫描/static-Lib/product/libexidcardios.a
静态库的生成
1、模拟器静态库,即在编译时 Devices 选择 iOS simulators 中的任一个模拟器。
2、真机静态库,即在编译时 Devices 选择 iOS Device。
注意:可以通过终端命令 lipo -info 静态库 查看静态库的信息,如支持版本。

本文详细介绍了如何使用终端命令lipo-create来合并iOS真机静态库和模拟器静态库,包括静态库的生成方式、路径示例及通过终端命令查看静态库信息的方法。
725





