ios 在 Xcode 4 中设置活动构建配置的位置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5298916/
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
Where is set the active build configuration in Xcode 4
提问by Ludovic Landry
I have 3 configurations in my project (Debug, Distribution_AdHoc and Distribution_AppStore). In Xcode 3 we had a list to choose device, version, configuration and target before build and run. Now with Xcode 4 we only have the device kind and version in this list. This bring my two questions:
我的项目中有 3 个配置(Debug、Distribution_AdHoc 和 Distribution_AppStore)。在 Xcode 3 中,我们有一个列表可以在构建和运行之前选择设备、版本、配置和目标。现在使用 Xcode 4,我们在这个列表中只有设备种类和版本。这带来了我的两个问题:
So where is defined the configuration used ? Is that the configuration defined in "Project > Info > Command-line builds use: Debug" ?
And now the "Project" menu is replaced by "Product" So where can we create (or duplicate and edit) a Configuration ?
那么在哪里定义使用的配置?是在“Project > Info > Command-line builds use: Debug”中定义的配置吗?
现在“项目”菜单被“产品”取代 那么我们可以在哪里创建(或复制和编辑)配置?
Thank you.
谢谢你。
回答by Ben Mosher
Just in case you still want to make a Distribution config (or other config--I still find them useful), after great length (read: searched in the help for 'duplicate'), I found this:
以防万一您仍然想要制作分发配置(或其他配置 - 我仍然发现它们很有用),经过长时间(阅读:在帮助中搜索“重复”),我发现了这个:
At first, they were all grayed out; this was because I had one of the targets highlighted in the editor (MFE, MFETests, etc.). If you highlight your project (as in the screenshot), they become enabled.
起初,它们都是灰色的;这是因为我在编辑器中突出显示了其中一个目标(MFE、MFETests 等)。如果您突出显示您的项目(如屏幕截图所示),它们将被启用。
回答by rckoenes
You can use alt(option) and click on either, run, test or profile to see the option. Here you can set the target for each option.
您可以使用 alt(option) 并单击运行、测试或配置文件中的任一个以查看选项。您可以在此处为每个选项设置目标。
For Archive the release is normally used, since can you resign your app via the organizer there is no need ad-hoc and appstore target any more.
对于存档,通常使用发布版本,因为您可以通过组织者退出您的应用程序,因此不再需要临时和应用程序商店目标。
回答by BTRUE
For part 1 of your question,
对于您问题的第 1 部分,
The configuration is set in the schema window. apple+shift+comma to get to the window. Or Product > Scheme > Manage Schemes from the menu bar.
配置是在架构窗口中设置的。apple+shift+comma 到窗口。或从菜单栏中的产品 > 方案 > 管理方案。
In the window, click the type of build you want on the left panel: Build, Run, Profile, Analyze, or Archive. In the window tab usually, along the type, there is an option Build Configuration that can be set. Select Debug, Release, or whichever configuration you want there.
在窗口中,在左侧面板上单击所需的构建类型:构建、运行、分析、分析或存档。通常在窗口选项卡中,沿着类型,有一个可以设置的选项构建配置。选择调试、发布或您想要的任何配置。
The exception if the build task. The build task uses whatever configuration is set for the Run task. Also, the analyze and archive tasks only have one tab, so using the info tab is not necessity.
构建任务的异常。构建任务使用为运行任务设置的任何配置。此外,分析和存档任务只有一个选项卡,因此不必使用信息选项卡。
Apparently, "build" is shorthand for "build for run"...
显然,“build”是“build for run”的简写……