自动部署 OTAD
来源:互联网 发布:asp网站数据库在哪里 编辑:程序博客网 时间:2024/06/05 06:01
Automating Over The Air Deployment for iPhone
Automating Over The Air Deployment for iPhone
Since the release of the iOS4 we are able to distribute iPhone applications “Over The Air” (i.e: directly downloading the application from the iPhone without using iTunes).
This greatly simplifies the deployment process especially for entreprises where iTunes is rarely a corporate tool. It also allows you to create your own enterprise App Store.
But until now it was a fully manual process : not anymore !
In this article we’ll see how to automate the deployment with a software factory, thus making the deployment more reliable and more productive.
The missing command line :
Over the air deployment is based on a new command in the build menu of Xcode called “build and archive” which packages the application with an embedded provisioning profile.
There have been many questions on how to integrate this feature in a continuous integration process.
The “xcodebuild” command is well known : it builds an Xcode project from the command line and generates an “.app” file.
You can use this command to build your application from a script ran by a software factory.
But the generated file cannot be distributed over the air since it misses the embedded provisioning profile.
We need to build the project into an “.ipa” file, containing the provisioning profile and signed with your developper identity.
To be able to find the command line, the trick was to watch the system console log while running a “build and archive” through Xcode. You will then see something similar to this :
Console log extract :
31/10/10 20:57:16 Xcode[16510] Running /usr/bin/xcrun with (
“-sdk”,
iphoneos,
PackageApplication,
“-v”,
“/Users/barbu/Library/MobileDevice/Archived Applications/FDA8B2FA-5AE1-43E7-BF9F-CD32FD258907.apparchive/TestTemplate.app”,
“-o”,
“/Users/barbu/Library/MobileDevice/Archived Applications/FDA8B2FA-5AE1-43E7-BF9F-CD32FD258907.apparchive/TestTemplate.ipa”,
“–sign”,
“iPhone Developer: M VINCENT DAUBRY (J9TS3TJRYX)”,
“–embed”,
“/Users/barbu/Library/MobileDevice/Provisioning Profiles/68D899AB-9FEB-4CBB-A080-1078FF2FABCF.mobileprovision”
)
Writing the script :
You can now run a script which will :
- Build your application into an .app file
1
xcodebuild -target
"${PROJECT_NAME}"
-sdk
"${TARGET_SDK}"
-configuration Release
- Package it into an .ipa file
1
/usr/bin/xcrun -sdk iphoneos PackageApplication -v
"${RELEASE_BUILDDIR}/${APPLICATION_NAME}.app"
-o
"${BUILD_HISTORY_DIR}/${APPLICATION_NAME}.ipa"
--sign
"${DEVELOPER_NAME}"
--embed "${PROVISONING_PROFILE}”
Here is a sample build script.
EDIT: June 13th, 2012
Since this article has been published, the industrialization of iOS development has been improved. Specially with the release of the XCode plugin for Jenkins.
One year ago, OCTO launched the Appaloosa service, the private store service to help our teams, our customers and anybody who needs to go further with the Over-The-Air distribution of their private apps.
Appaloosa provides its own Jenkins plugin to automatically deploy the latest version of an application to the private store.
- 自动部署 OTAD
- Tfs 自动部署 部署图
- liferay 热部署、自动部署
- myeclipse自动部署
- myeclipse Resin自动部署
- Ant+Tomcat自动部署
- tomcat自动部署
- tomcat自动部署
- tomcat自动部署
- java类自动部署
- Git自动部署
- hudson的自动部署
- jenkins 自动部署失败
- tomcat自动部署
- tomcat自动部署方式
- 远程自动部署
- Jenkins 自动部署 项目
- 自动部署工具
- Ubuntu下安装可视化的SVN客户端
- redhat linux下配置JSP+mysql网站记录
- hdu1195 Open the Lock
- C# 任意键退出 和 XML 格式化输出函数
- Servlet生命周期详解与图解
- 自动部署 OTAD
- ural1028 poj2352
- 判断字符串的长度,汉字为2,字母数字为1,如果超出长度,跳出
- linux 常用命令
- 长城汽车红与黑
- porting gc2035
- 关于ARM的22个常用概念!
- android 4种动画
- 下拉列表的二级联动(省、市)