iOS命令行自动打包(archive)
来源:互联网 发布:2016nba总决赛数据 编辑:程序博客网 时间:2024/05/19 12:17
前言
iOS开发工程师在测试修复bug的过程中,一般会存在频繁打包的情况,如果一步步在xcode中点击archive,下一步,下一步。。。这样太浪费我们的时间了。下面我们来介绍在命令行使用xcodebuild命令进行自动archive打包并且导出ipa文件。
准备工作
打开你的项目工程配置你的证书和描述文件:
clean一下你的工程
进入到你的工程目录下面:
cd /Dandy/dandy_workSpace/TestAutoPacking/
使用以下命令clean工程:
xcodebuild clean -project TestAutoPacking.xcodeproj -scheme TestAutoPacking -configuration Release
如果你的工程pod了第三方库,那么你的工程目录下会有”.xcworkspace”文件,你将使用这个文件来打开你的项目工程,我们需要替换下我们的命令:
xcodebuild clean -workspace TestAutoPacking.xcworkspace -scheme TestAutoPacking -configuration Release
上面的命令中: -project TestAutoPacking.xcodeproj:编译项目名称 -workspace TestAutoPacking.xcworkspace:编译工作空间名称 -scheme TestAutoPacking:scheme名称(一般会与你的项目名称相同) -configuration Release:(Debug/Release)
clean成功会是这样:
archive导出.xcarchive文件
使用下面的命令archive导出.xcarchive文件:
xcodebuild archive -project TestAutoPacking.xcodeproj -scheme TestAutoPacking -archivePath /dandy/xmeAutoArchive/TestAutoPacking.xcarchive
或者:
xcodebuild archive -workspace TestAutoPacking.xcworkspace -scheme TestAutoPacking -archivePath /dandy/xmeAutoArchive/TestAutoPacking.xcarchive
上面的命令中: -project TestAutoPacking.xcodeproj:同clean步骤中一样 -workspace TestAutoPacking.xcworkspace:同clean步骤中一样 -scheme TestAutoPacking:同clean步骤中一样 -archivePath /dandy/xmeAutoArchive/TestAutoPacking.xcarchive:导出.xcarchive文件的目录以及文件名称
archive成功会是这样:
同样会在/dandy/xmeAutoArchive目录下面生成一个TestAutoPacking.xcarchive文件:
导出ipa包
使用下面命令将.xcarchive文件导出为ipa包:
xcodebuild -exportArchive -archivePath /dandy/xmeAutoArchive/TestAutoPacking.xcarchive -exportPath /dandy/xmeAutoArchive/TestAutoPacking -exportFormat ipa -exportProvisioningProfile "developmentProfile"
上面的命令中: -archivePath /dandy/xmeAutoArchive/TestAutoPacking.xcarchive:刚刚导出的.xcarchive文件的目录 -exportPath /dandy/xmeAutoArchive/TestAutoPacking:将要导出的ipa文件的目录以及文件名 -exportFormat ipa:导出为ipa文件 -exportProvisioningProfile "developmentProfile":你配置的profile文件的名称:
导出ipa成功会是这样:
同样会在/dandy/xmeAutoArchive目录下面生成一个TestAutoPacking.ipa文件:
这样我们的ipa包就导出成功了。
上传ipa包
至于导出ipa包后,怎么安装到手机上,方式就很多了,托管平台也很多:蒲公英,fir.im。就看您自己的选择啦~
结语
希望对您有帮助,谢谢支持~欢迎关注,我会在空余时间更新技术文章~
- iOS命令行自动打包(archive)
- iOS 命令行自动打包 (archive)
- iOS命令行自动打包(archive)
- ios xcodebuild命令行自动打包 shell脚本
- IOS-Archive快速打包
- iOS项目打包 Archive UUID
- ios打包Archive时报错
- IOS-命令行打包ipa
- iOS App Archive & Generic Xcode Archive 无法打包发布ipad
- Xcode 不能打包iOS App Archive
- iOS打包Archive上传到fir.im
- android命令行打包、签名+自动打包器
- android命令行打包、签名+自动打包器
- Android自动打包之命令行打包
- android命令行打包、签名+自动打包器
- iOS APP archive打包和打包成Ipa
- iOS 使用命令行打包程序
- iOS 自动打包
- Shiro的标签应用
- 《从零开始学Swift》学习笔记(Day54)——抛出错误
- 十张数据图回顾雾霾,北京污染从南向北加深趋势明显
- javaFX - FileChooser
- tensorflow学习笔记(二十五):ConfigProto&GPU
- iOS命令行自动打包(archive)
- ssh免密码登录配置方法,(图示加命令)
- HTC vive基于unity的凝视交互功能(带HTC 插件)
- [译]Android Activity 和 Fragment 状态保存与恢复的最佳实践
- spark streaming 2 ParallelCollectionRDD
- Dos命令查看端口占用及关闭进程
- Gradle for Android-建立持续集成
- 配置NGINX同时运行 https 和 http
- 【Unity工具】Sprite Illuminator下载教程&TexturePacke资料总结