環境
- 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}.xcarchive -export