如何查看库信息与合并库
1.打开终端,执行如下命令:
$ lipo -info path
$ lipo -create path path -output newpath
2.示例:
1 $ lipo -info /Users/***/Desktop/Release-iphoneos/DemoFramework.framework/DemoFramework 2 Architectures in the fat file: /Users/***/Desktop/Release-iphoneos/DemoFramework.framework/DemoFramework are: armv7 arm64 3 4 $ lipo -info /Users/***/Desktop/Release-iphonesimulator/DemoFramework.framework/DemoFramework 5 Architectures in the fat file: /Users/***/Desktop/Release-iphonesimulator/DemoFramework.framework/DemoFramework are: i386 x86_64 6 7 $ lipo -create /Users/***/Desktop/Release-iphoneos/DemoFramework.framework/DemoFramework /Users/***/Desktop/Release-iphonesimulator/DemoFramework.framework/DemoFramework -output /Users/***/Desktop/Release/DemoFramework 8 9 $ lipo -info /Users/***/Desktop/Release/DemoFramework 10 Architectures in the fat file: /Users/***/Desktop/Release/DemoFramework are: i386 x86_64 armv7 arm64
3.注意:
a) path可以通过把文件拖入终端中获得;
b) 如果是.a文件,path就是.a的路径;如果是.framework,path是framework里面的那个路径;
c) 最后找到newpath下生成的库替换之前的库文件就行。
时常一个人发呆,看到宁静的天空。