用 xcode 命令行打包 ipa

引用自这里 https://developer.apple.com/forums/thread/70326

## ipa.sh
## usage: PASSWORD=loginpassword sh ipa.sh
security unlock-keychain -p $PASSWORD login.keychain
NAME=Unity-iPhone
## Builds the app into an archive
#xcodebuild -project ${NAME}.xcodeproj -scheme ${NAME} -archivePath ${NAME}.xcarchive archive

## Exports the archive according to the export options specified by the plist
xcodebuild -exportArchive -archivePath ${NAME}.xcarchive -exportPath output -exportOptionsPlist ${NAME}.xcarchive/Info.plist

第一行的 security unlock-keychain 引用自这里 https://stackoverflow.com/questions/24023639/xcode-command-usr-bin-codesign-failed-with-exit-code-1-errsecinternalcomponen

上面的脚本可以用于打包 Unity 导出的 ios 工程,还需要在 xcode 里设置 apple 账号。

点击进入评论 ...