1. 新建一个Target

2. 选中Build Phases, Menu->Editor->Add Build Phase-> Add Run Script Build Phase

3. 在Shell里填写

rm -rf ${BUILT_PRODUCTS_DIR}/libTest.alipo -create \"${BUILD_DIR}/Debug-iphoneos/libTestLib.a" \"${BUILD_DIR}/Debug-iphonesimulator/libTestLib.a" -output \"${BUILD_DIR}/libTestLibAll.a"


4. 依次编译真机,模拟器Target,然后再选择此脚本的Target,即可获得含有此arm7, arm7s, i386的静态库