Xcode `Archive` 功能是否会自动使用 `Release` 构建配置?

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

Does the Xcode `Archive` function automatically use the `Release` build configuration?

iosxcodemacos

提问by ck_

My standard workflow, when releasing an app to the App Store, is to press Product > Archivefrom Xcode's menubar.

在向 App Store 发布应用程序时,我的标准工作流程是Product > Archive从 Xcode 的菜单栏中按下。

I realize that I never change the Xcode Build Configurationin my build scheme. I have it set to Debugduring development, but want the version on the App Store to be Release.

我意识到我从不更改Build Configuration构建方案中的 Xcode 。我Debug在开发过程中将其设置为,但希望 App Store 上的版本为Release.

I am hoping and assuming that Product > Archiveautomatically uses a Releasebuild configuration. Can anyone confirm?

我希望并假设Product > Archive自动使用Release构建配置。有人可以确认吗?

回答by Ben M

Yes. By default, the Debug configuration is used for running on the Simulator while the Release is for Archives. I recommend looking at your Schemes.

是的。默认情况下,Debug 配置用于在模拟器上运行,而 Release 用于存档。我建议看看你的计划。

Product -> Scheme -> Edit Scheme...

产品 -> 方案 -> 编辑方案...