##不越狱 可以很方便的自动发布 创新源于一种感觉,卢远强
查看当前环境,例如,服务器ip以192.168.1.188为例,端口8080
*第一步
第一步,配置run script打包ipa并完成ipa上传部署过程,Xcode中打开target->build phases->add build phase->add run script如图添加如下代码,并根据自己使用环境
# shell script goes here
# compress application.
if [ "${CONFIGURATION}" = "ad_hoc" ]; then #判断发布版本
/bin/mkdir $CONFIGURATION_BUILD_DIR/Payload
/bin/cp -R $CONFIGURATION_BUILD_DIR/InstaSoccer.app $CONFIGURATION_BUILD_DIR/Payload
/bin/cp isoccer/icon/iTunesArtwork $CONFIGURATION_BUILD_DIR/iTunesArtwork
cd $CONFIGURATION_BUILD_DIR
# zip up the Instasoccer directory
/usr/bin/zip -r InstaSoccer.ipa Payload iTunesArtwork
/usr/bin/scp InstaSoccer.ipa sshuser@192.168.1.188:~/ipa_publish/ #scp到服务器路径,如果用Mac本机开启服务器,可以用cp到webserver路径
fi
exit 0
*第二步
index.html和Info.plist
index.html修改一处,“http://192.168.1.188:8080/Info.plist” 改为你相应的路径
index.html
html>
<head>
<meta charset="utf-8" />
<title>Minroad一键安装</title>
</head>
<a style="font-size: 5em;" href="itms-services://?action=download-manifest&url=http://192.168.1.188:8080/Info.plist">install</a>
<html>
info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>items</key>
<array>
<dict>
<key>assets</key>
<array>
<dict>
<key>kind</key>
<string>software-package</string>
<key>url</key>
<string>http://192.168.1.188:8080/InstaSoccer.ipa</string>
</dict>
<dict>
<key>kind</key>
<string>display-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>http://192.168.1.188:8080/Icon.png</string>
</dict>
<dict>
<key>kind</key>
<string>full-size-image</string>
<key>needs-shine</key>
<true/>
<key>url</key>
<string>http://192.168.1.188:8080/Icon.png</string>
</dict>
</array>
<key>metadata</key>
<dict>
<key>bundle-identifier</key>
<string>com.minroad.appid</string>
<key>bundle-version</key>
<string>2.8.2</string>
<key>kind</key>
<string>software</string>
<key>subtitle</key>
<string>一键安装副标题</string>
<key>title</key>
<string>一键安装程序名</string>
</dict>
</dict>
</array>
</dict>
</plist>
*第三步
启动web访问 python方式
cd 到当前目录
nohup python -m SimpleHTTPServer 8080 > /dev/null 2>&1 &
###启用Dropbox分享
www.dropbox.com 地址替换为 dl.dropboxusercontent.com
itms-services://?action=download-manifest&url=https://dn-goswift.qbox.me/MapMyRun.plist
itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/wpwb5udo17pox68/resume.pdf?dl=0
参考