【ADHoc】iOS研发中可以运用自动化提高效率

##不越狱 可以很方便的自动发布 创新源于一种感觉,卢远强 查看当前环境,例如,服务器ip以192.168.1.188为例,端口8080

*第一步

第一步,配置run script打包ipa并完成ipa上传部署过程,Xcode中打开target->build phases->add build phase->add run script如图添加如下代码,并根据自己使用环境

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

参考链接 http://stackoverflow.com/questions/20276907/enterprise-app-deployment-doesnt-work-on-ios-7-1

转载于:https://my.oschina.net/kshopping/blog/631406

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值