您将如何自动化 iPhone 应用程序的多个构建?
我知道 付费与免费讨论,但我还有一些额外的问题没有在其中讨论:
假设我编写了一个 iPhone 应用程序,可以让您阅读报纸。 我想构建该应用程序的四个副本,每个副本对应一份可以阅读的报纸,因此我有四个不同的应用程序,每个应用程序阅读不同的报纸。
这是另一个线程没有涵盖的两个问题:
应用程序读取的论文是在主 plist 中定义的,不是在代码中,所以我不确定预处理器宏技巧是否适用。 如果是,如何将它们合并到 plist 文件中?
我想立即构建应用程序的所有四个版本; 我不想依次选择每个目标并重复该过程四次。 我想要一个单独的“makefile”(如果你愿意的话)来构建它们,并且最好还部署它们模拟器,这样当我启动它时,我可以在一个会话中测试它们。
XCode 中存在这样的工具吗? 如果没有,您会推荐哪些外部工具?
谢谢。
I am aware of the paid vs. free discussion, but I have a couple extra issues that aren't covered there:
Say I've written an iPhone app that lets you read a newspaper. I want to build four copies of the app, one for each individual newspaper that can be read, so I have four distinct apps, each reading a different newspaper.
Here's the two catches that the other thread doesn't cover:
Which paper the app reads is defined in the main plist, not in code, so I'm not sure the preprocessor macro tricks apply. If they do, how do you incorporate them into a plist file?
I want to build all four versions of the app at once; I don't want to have to select each target in turn and repeat the process four times. I want a single "makefile" (if you will) that builds them all, and preferably also deploys them simulator so when I start it up I can test them all in a single session.
Do such facilities exist in XCode? If not, what external tools might you recommend?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以轻松地组合使用 xcodebuild 命令行工具从特定 xcode 项目进行构建的 bash 脚本。
xcodebuild 工具需要一些参数,主要是 xcode 项目文件、您希望构建的目标和配置。
使用该信息,您可以从项目文件中的目标编写多个构建脚本,而无需手动执行。
You can easily knock together a bash script that uses the xcodebuild command line tool to do builds from a particular xcode project.
The xcodebuild tool takes a few arguments, mainly the xcode project file, the target you wish to build and the configuration.
Using that info you can script several builds from targets in your project file without having to do it manually.