如何在 Xcode 6 / 7 / 8 中的 Debug 和 Release 版本之间切换?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28059697/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 18:03:12  来源:igfitidea点击:

How do I toggle between Debug and Release builds in Xcode 6 / 7 / 8?

xcodexcode8xcode7xcode9xcode10

提问by drewish

How do I get Xcode to build an OS X app in release mode? I can only seem to find instructions for earlier versions and none of the screenshots match. I didn't see anything when I put "release" into the help menu's search.

如何让 Xcode 在发布模式下构建 OS X 应用程序?我似乎只能找到早期版本的说明,并且没有任何屏幕截图匹配。当我将“发布”放入帮助菜单的搜索中时,我什么也没看到。

回答by skyline75489

In Xcode 6 - 10:

在 Xcode 6 - 10 中:

Choose Product-> Scheme-> Edit Scheme. Change the Build Configurationunder the Infotab.

选择产品->方案->编辑方案。更改选项卡Build Configuration下的Info

Shortcut: hold Alt?and click the run button ?.

快捷方式:按住Alt?并单击运行按钮?



enter image description here

在此处输入图片说明

enter image description here

在此处输入图片说明

回答by algal

The easiest way with a project that has the default set up for schemes is just to do Product -> Build For -> Profiling.

对于具有默认方案设置的项目,最简单的方法就是执行 Product -> Build For -> Profiling。

回答by matt

When you want to generate a release build, choose Product -> Archive. That is a Release build. Now you can export as a Mac OS X app.

如果要生成发布版本,请选择“产品”->“存档”。那是一个发布版本。现在您可以导出为 Mac OS X 应用程序。