主张先阅览榜首版别,了解一下流程。本文只解说首要装备流程。
这次版别需求装置python,mac os自带,所以用本机做分发的不需求忧虑。
runserver.py
这次服务器部置只需一个py文件就可以彻底搞定。
py文件中只需求修正这几行
host = http://192.168.1.188:8080/#服务器ip
ipaname = InstaSoccer#与xcode打包时代码的ipa名相同
bundleid = com.minroad.appid#bundle id
appname = 一键装置 #app name
在xcode里run script里边参加如下代码,scp是将ipa上传到与py文件同一目录下
# Date: 2013-06-20
# Author: Seamus
# Sina Weibo: @qdvictory
# compress application.
if [ ${CONFIGURATION} = ad_hoc ]; then
#.app名,默许与target name共同
ipaname=InstaSoccer
#工程地点目录为根目录
pathtoartwork=isoccer/icon/iTunesArtwork
#scp上传用户名及ip
sshhost=sshuser@192.168.1.188
/bin/mkdir $CONFIGURATION_BUILD_DIR/Payload
/bin/cp -R $CONFIGURATION_BUILD_DIR/${ipaname}.app $CONFIGURATION_BUILD_DIR/Payload
/bin/cp ${pathtoartwork} $CONFIGURATION_BUILD_DIR/iTunesArtwork
cd $CONFIGURATION_BUILD_DIR
# zip up the Instasoccer directory
/usr/bin/zip -r ${ipaname}.ipa Payload iTunesArtwork
#rm -R $CONFIGURATION_BUILD_DIR/Payload 放到上传ipa之后,否则会提示签名过错
/usr/bin/scp ${ipaname}.ipa ${sshhost}:~/ipa_publish/${ipaname}_`date +%Y%m%d%H%M`_$(/usr/libexec/PlistBuddy -c Print :CFBundleVersion $REV ${TARGET_BUILD_DIR}/${INFOPLIST_PATH}).ipa
rm -R $CONFIGURATION_BUILD_DIR/Payload
rm ${ipaname}.ipa
fi
exit 0
假如想要下载时有图标的话,在py文件同目录下增加Icon.png文件就可以
接下来,发动Server
nohup python runserver.py 8080 > /dev/null 2>1
手机拜访服务器ip,全部ok