iOS Framework制作

2019-03-27  本文已影响0人  ___吉

lipo -info

$ lipo -info '文件路径/'xxxLib.framework/xxxLib 

在xxxLib.framework中有个以xxxLib命名的文件,将此文件直接拖进终端即可得到路径。
终端输出

Architectures in the fat file: /Users/XXX/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/xxxLib.framework/xxxLib are: i386 x86_64 

i386 x86_64 支持模拟器,因为上述输出的是Debug-iphonesimulator文件夹下的,实际开发中,一般都要同时支持模拟器和真机,这时,需要将Debug-iphoneos 和Debug-iphonesimulator文件夹下的framework合并。

使用命令:lipo -create '第一个文件路径' '第二个文件路径' -output '输出文件路径'
$ lipo -create /Users/nathan/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/WSBLELib.framework/WSBLELib /Users/nathan/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphoneos/WSBLELib.framework/WSBLELib -output /Users/nathan/Desktop/WSBLELib
$ lipo -info /Users/nathan/Desktop/WSBLELib 
Architectures in the fat file: /Users/nathan/Desktop/WSBLELib are: i386 armv7 armv7s x86_64 arm64 

i386 armv7 armv7s x86_64 arm64
已同时支持模拟器和真机

上一篇 下一篇

猜你喜欢

热点阅读