ios 从 xcode 命令行生成 ipa
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8334500/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Generating ipa from xcode command-line
提问by Vasanth
Whats the best approach for generating an IPA file from command-line?
从命令行生成 IPA 文件的最佳方法是什么?
I'm on xcode 4.2 and generating the archive using:
我在 xcode 4.2 上并使用以下方法生成存档:
xcodebuild -scheme AppStore clean archive
This generates the .dSYM and .app files in the build output directory, after codesigning. How should I proceed to generate the .ipa file? In other words, I'm looking for the command-line equivalent of doing the following in GUI
代码签名后,这会在构建输出目录中生成 .dSYM 和 .app 文件。我应该如何继续生成 .ipa 文件?换句话说,我正在寻找等效于在 GUI 中执行以下操作的命令行
- Organizer - Archives
- Share
- iOS App Store Package
- Don't Re-sign
- 组织者 - 档案
- 分享
- iOS 应用商店包
- 不要重新签名
Thanks!
谢谢!
采纳答案by Joshua Weinberg
The missing piece is using the PackageApplication utility.
缺少的部分是使用 PackageApplication 实用程序。
/usr/bin/xcrun -sdk iphoneos PackageApplication -v $FULL_PATH_TO_APP -o $OUTPUT_PATH
/usr/bin/xcrun -sdk iphoneos PackageApplication -v $FULL_PATH_TO_APP -o $OUTPUT_PATH
You can also pass this script options for resigning, and profile embedding. Using the --sign
and --embed
flags respectively.
您还可以传递此脚本选项以进行辞职和配置文件嵌入。分别使用--sign
和--embed
标志。
回答by Rayfleck
This tool makes it trivial to build (and distribute): https://github.com/nomad/shenzhen
这个工具使得构建(和分发)变得微不足道:https: //github.com/nomad/shenzhen
回答by srikanth Nutigattu
After Archive, you need to "Export" to desired format ie ipa:
存档后,您需要“导出”到所需的格式,即 ipa:
xcodebuild -sdk iphoneos7.0 -archivePath "path to archive file" -exportPath "path_for_export" -exportFormat ipa -exportArchive -exportProvisioningProfile "provisioning_profile_to_export_with"
xcodebuild -sdk iphoneos7.0 -archivePath “归档文件的路径” -exportPath “path_for_export” -exportFormat ipa -exportArchive -exportProvisioningProfile “provisioning_profile_to_export_with”