为什么X codebuild给出不同的构建结果超过X code UI [英] Why does xcodebuild give different build results than XCode UI
问题描述
我有一个工作空间内的一系列项目,并尝试使用以下类型的命令通过命令行来构建它们:
I have a series of projects within a workspace, and trying to use the following type of command to build them via the command line:
"Xcodebuild -project XXX"
or
"Xcodebuild -workspace XXX -scheme YYY"
我的一些项目的建设很好,但别人给奇怪的错误,如'XXX'例如消息不带选择申报方法或LD:库找不到-lMyLibrary
Some of my projects build fine but others give strange errors, like "'XXX' for instance message does not declare a method with selector" or "ld: library not found for -lMyLibrary"
但所有这些项目建设从X code UI中没有罚款的问题。
However all these projects build fine from within the XCode UI without issues.
在此基础上,似乎是在命令行和UI使用不同的工具集的构建,但是,似乎是一个非常糟糕的主意,所以我希望我错了这一点。或者可能还有刚才几个不同的构建标志被在命令行构建设置。
Based on this is seems that the command line and UI builds are using a different toolset, but that seems like a very bad idea so I'm hoping I'm wrong about this. Or possibly there are just a few different build flags being set on the command line build.
我可以尝试一个解决的问题之一,但我希望我可以写一个脚本做的UI类型完全相同的构建。
I can try to troubleshoot the issues one by one but I'm hoping I can write a script which does the exact same type of build as the UI.
任何想法?
推荐答案
不包括 -configuration
,X codebuild将使用默认配置为每个项目。普遍认为的发布。在X code,您选择的配置将被应用到每一个项目,无论默认值。
Without including -configuration
, xcodebuild is going to use the default configuration for each project. Generally that's Release. In Xcode, the Configuration you select will be applied to every project regardless of default.
由于你的错误,你最有可能的问题是,你使用的生成窗格(的为什么我讨厌构建窗格中大型项目的),你已经做出申请调试的一些设置,而不是所有配置的经典错误。
Given your errors, your most likely problem is that you've used the build pane (why I hate the build pane for large projects), and you've made the classic mistake of applying some settings for Debug rather than all configurations.
这篇关于为什么X codebuild给出不同的构建结果超过X code UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!