ios 如何在 Xcode 中创建发布版本?

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

How do I create a release build in Xcode?

iosxcodemacosbuildrelease

提问by cyclingIsBetter

Why is it that when I build an application, Xcode creates a debug build? I want to create a release build. How can I do this?

为什么当我构建一个应用程序时,Xcode 会创建一个调试版本?我想创建一个发布版本。我怎样才能做到这一点?

采纳答案by Helge Becker

It is done over building an Archive version.

它是在构建存档版本后完成的。

First connect a iOS device to your MAC. Then select that device as target in xcode.

首先将 iOS 设备连接到您的 MAC。然后在 xcode 中选择该设备作为目标。

Now click on the tab "Product" and click on "Archive"

现在单击“产品”选项卡,然后单击“存档”

回答by bobobobo

Product/ Scheme/ Edit Scheme..

产品/方案/编辑方案..

enter image description here

在此处输入图片说明

And from the menu that comes up, select Releaseunder "Build Configuration".

从出现的菜单中,选择“构建配置”下的发布

enter image description here

在此处输入图片说明

回答by Suragch

Xcode 11

Xcode 11

I found this question because I had already finished debugging my app and I wanted to make a release build for the app store. I always forget which menu item to use, though. This answer is a reminder to me and others next time.

我发现这个问题是因为我已经完成了我的应用程序的调试,我想为应用程序商店制作一个发布版本。不过,我总是忘记使用哪个菜单项。这个答案是对我和其他人的提醒。

Choose the Generic iOS Devicefrom the active scheme menu.

从活动方案菜单中选择通用 iOS 设备

enter image description here

在此处输入图片说明

Then go to Product > Archive.

然后转到“产品”>“存档”

enter image description here

在此处输入图片说明

You may have to wait a little while for Xcode to finish archiving your project. After that you will be shown a dialog with your archived project. You can select Distribute app...and follow the prompts.

您可能需要等待 Xcode 完成对项目的归档。之后,您将看到一个包含存档项目的对话框。您可以选择分发应用程序...并按照提示操作。

More Help

更多帮助

This answer is for those who are already all signed up with a developer account and just need to get the archive from Xcode to iTunes Connect. If you need more help signing up for a developer account and getting an app to the app store, read the following links.

这个答案适用于那些已经全部注册了开发者帐户并且只需要将档案从 Xcode 获取到 iTunes Connect 的人。如果您需要更多帮助来注册开发者帐户并将应用程序下载到应用程序商店,请阅读以下链接。

回答by Itai Ferber

To create a release build, you have to edit your current scheme (?<) and highlight "Run [name of application]. On the right, select "Build Configuration" and choose "Release". Build as usual.

要创建发布版本,您必须编辑当前方案 (?<) 并突出显示“运行 [应用程序名称]。在右侧,选择“构建配置”并选择“发布”。照常构建。

回答by Riz

If any one needs to go through how to make Adhoc build, here are quick steps

如果有人需要了解如何进行 Adhoc 构建,这里有一些快速步骤

Product > Archive

产品 > 档案

then

然后

Export > Save for Ad Hoc Deployment ....

导出 > 保存以供临时部署....

See quick video http://jmp.sh/MQq2yjK

看快速视频http://jmp.sh/MQq2yjK