静态库的合并

来源:互联网 发布:iphone x抢购软件 编辑:程序博客网 时间:2024/05/21 12:43

使用终端

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 静态库 查看静态库的信息,如支持版本。


0 0
原创粉丝点击