步骤一
步骤二
PRODUCTS_PATH="${BUILT_PRODUCTS_DIR}"
TARGET_APP_PATH="$PRODUCTS_PATH/${TARGET_NAME}.app"
cd ../
cd ../
rm -rf 打包
mkdir -p 打包
cd 打包
touch package.command
chmod +x package.command
echo "#!/bin/bash" >> package.command
echo 'cd `dirname $0`;' >> package.command
echo "mkdir Payload;" >> package.command
echo "echo =============================打包中 =============================;" >> package.command
echo "cp -rf $TARGET_APP_PATH Payload;" >> package.command
echo "zip -r -q ${TARGET_NAME}.ipa Payload;" >> package.command
echo "rm -rf Payload;" >> package.command
echo "echo =============================打包完成=============================;" >> package.command
echo "exit;" >> package.command
步骤三
运行 或者 command+b 这个时候会在你项目的同级目录下有个打包
文件夹
点击 package.command,会自动执行打包命令,打包成功后会在当前文件夹下生成项目的ipa包。
网友评论