合并iOS设备与模拟器库

【http://xbiii3s.iteye.com/blog/1462627】


10.  最后是关键步骤: 

通过lipo -create 命令来合并2个静态库文件。(-output 后面的/Users/cash/Desktop/test/libMtimeLibrary.a 是合并后的路径和文件名字) 

lipo -create "/Users/cash/Library/Developer/Xcode/DerivedData/MtimeLibrary-amyqbnwwzcivnyeijggzaorseihj/Build/Products/Debug-iphonesimulator/libMtimeLibrary.a" "/Users/cash/Library/Developer/Xcode/DerivedData/MtimeLibrary-amyqbnwwzcivnyeijggzaorseihj/Build/Products/Debug-iphoneos/libMtimeLibrary.a" -output "/Users/cash/Desktop/test/libMtimeLibrary.a"   
成功! 

最后通过命令 lipo -info libMtimeLibrary.a  可以知道这个文件已经有i386和armv7信息了。 
cashmatoMacBook-Pro:test cash$ lipo -info libMtimeLibrary.a 
Architectures in the fat file: libMtimeLibrary.a are: i386 armv7 
cashmatoMacBook-Pro:test cash$ 


//银联合并成通用静态库 
lipo -create "/Users/cash/Desktop/iphonesimulator/upomp_bypay/lib/libUPOMP.a" "/Users/cash/Desktop/iphoneos/upomp_bypay/lib/libUPOMP.a" -output "/Users/cash/Desktop/test/libUPOMP.a"   

你可能感兴趣的:(合并iOS设备与模拟器库)