查看.a文件支持架構
lipo -info test.a
製作.a支持多架構
1.使用不同模擬器和真機build出不同架構的.a文件
2.把多個.a文件合併成一個支持多架構的.a文件
合併命令:
lipo --create i386.a x86_64.a -outpu i386_x86.a
腳本合併
for file in ./i386/*
do
if test -f $file
then
var=$file
name=${var##*/}
echo $name
lipo -create /Users/zzc/Desktop/project/selfRN/demo59/ios/arm64_armv7/$name /Users/zzc/Desktop/project/selfRN/demo59/ios/i386/$name /Users/zzc/Desktop/project/selfRN/demo59/ios/x86_64/$name -output /Users/zzc/Desktop/project/selfRN/demo59/ios/arm64_armv7_i386_x86_64/$name
# arr=(${arr[*]} $file)
fi
done