1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
1 #!/bin/sh 2 xcworkspace_path='./SDK.xcworkspace/' 3 scheme_name='SDK' 4 framework_name='SDK' 5 build_dir='.' 6 product_dir=$build_dir'/Build/Products' 7 configuration="Release" 8 9 xcodebuild clean 10 11 if test -d $build_dir'/Build'; then 12 rm -f -r $build_dir'/Build' 13 fi 14 15 pod install 16 17 #构建版本 18 xcodebuild -workspace $xcworkspace_path -scheme $scheme_name -configuration $configuration\ 19 build -derivedDataPath $build_dir -sdk iphonesimulator 20 xcodebuild -workspace $xcworkspace_path -scheme $scheme_name -configuration $configuration\ 21 build -derivedDataPath $build_dir -sdk iphoneos 22 23 echo '########### begin lip -create' 24 lipo -create $product_dir/Release-iphoneos/$framework_name.framework/$framework_name\ 25 $product_dir/Release-iphonesimulator/$framework_name.framework/$framework_name\ 26 -output $product_dir/$framework_name 27 28 echo '########### begin mv' 29 mv $product_dir/$framework_name $product_dir/Release-iphoneos/$framework_name.framework/ 30 31 echo '########### cp -R $product_dir/Release-iphoneos/$framework_name.framework ./' 32 cp -R $product_dir/Release-iphoneos/$framework_name.framework ./ 33 34 echo 'Done' |