Xcode4: Alternative Way to build IPAs

一世执手 提交于 2019-11-28 19:16:05

问题


So with XCode4, as is kinda well known, building .IPAs can only be created used "build and archive" if only one target has "Skip Install" set to "No".
My problem is that our project contains multiple targets, that need to be shipped as .ipas at some point. Setting "Skip Install" on each on everytime i need to build an .ipa is annoying. Does anybody know of a better way, maybe using those scary "Configuration Files" I've seen mentioned somewhere? Currently, i'm using the .app from the .xarchive and build an .IPA the old way, packaging it in a Payload folder.


回答1:


How about xcrun PackageApplication?

  • Xcode “Build and Archive” from command line

Execute xcrun from command line.

PRODUCTDIR=DerivedData/foo/Build/Products/AdHoc-iphoneos
TARGET=targetA
IDENTITY="iPhone\ Distribution:\ foo"
PROVISIONING_PROFILE="/Users/foo/Library/MobileDevice/Provisioning\ Profiles/foo.mobileprovision"
OUTDIR=out
/usr/bin/xcrun -sdk iphoneos PackageApplication -v "${PRODUCTDIR}/${TARGET}.app" -o "${OUTDIR}/${TARGET}.ipa" --sign "${IDENTITY}" --embed "${PROVISONING_PROFILE}"



回答2:


How about define several targets? That should you allow to adjust each separately for your needs.



来源:https://stackoverflow.com/questions/5640776/xcode4-alternative-way-to-build-ipas

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!