环境
- mac 系统
- mac 系统上搭建 jenkins 服务
- 其它请参考上级内容[jenkins]iOS 自动打包上传 fir
直接上脚本
// clean 内容
xcodebuild clean -workspace ${workspace} -scheme ${scheme} -configuration Debug -sdk iphonesimulator
xcodebuild clean -workspace ${workspace} -scheme ${scheme} -configuration Release -sdk iphoneos
// 打包 arhcive
xcodebuild archive -workspace ${workspace} -scheme ${scheme} -archivePath ${archivePath}
// 到处 ipa
// optionsPlist 可以在手动打包的 ipa 文件下找到
xcodebuild -exportArchive -exportOptionsPlist ${optionsPlist} -archivePath ${archivePath}.xc