Introduction

查看lipo详解

1
man lipo

lipo – create or operate on universal files

Usage

Simple

lipo -create xxx_arm.a xxx_i386.a -output xxx_universal.a

Example:

1
lipo -create /Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/Release-iphonesimulator/libPrint.a  /Users/pjk1129/Library/Developer/Xcode/DerivedData/Print-dgfkluumuexoxhcapzidtsmdgqcj/Build/Products/Release-iphoneos/libPrint.a  -output /Users/pjk1129/Desktop/libPrint.a

Shell

libevent.sh

1
2
3
4
5
6
#! /bin/sh
mkdir universal
lipo -create simulator/libevent.a device/libevent.a -o universal/libevent.a
lipo -create simulator/libevent_extra.a device/libevent_extra.a -o universal/libevent_extra.a
lipo -create simulator/libevent_core.a device/libevent_core.a -o universal/libevent_core.a
lipo -create simulator/libevent_pthreads.a device/libevent_pthreads.a -o universal/libevent_pthreads.a

Review Info

lipo -info xxx_universal.a

Example:

1
lipo -info /Users/pjk1129/Desktop/libPrint.a