```
//项目名
SCHEMENAME=PPX_Player
//Release 或 develop
BRANCHNAME=develop
DATE=$(date +%Y-%m-%d_%H:%M:%S)
SOURCEPATH=$(cd "$(dirname $0)"&&pwd)
IPAPATH=$SOURCEPATH/AutoBuildIPA/$BRANCHNAME/$(date +%Y-%m-%d)
IPANAME=$SCHEMENAME_$DATE.ipa
#
if [ -e $IPAPATH/* ]; then
mv $IPAPATH/* ~/.Trash
if [ $? -ne 0];then
echo "erroe:Delete trash files failed!!"
exit 1
fi
fi
#build xxxx
xcodebuild \
-project $SOURCEPATH/PPX_Player.xcodeproj \
-target $SCHEMENAME \
-configuration Release \
if [ ! -d $IPAPATH ]; then
mkdir -p $IPAPATH
fi
xcrun -sdk iphoneos PackageApplication \
-v $SOURCEPATH/Build/Release-iPhoneos/$SCHEMENAME.app \
-o $IPAPATH/$IPANAME
if [ -e $IPAPATH/$IPANAME ]; then
open $IPAPATH
else
echo 'Create IPA failed!'
fi
```
```
下载网址
https://pan.baidu.com/s/1geIVDM7
```