xcode 如何构建我的 iOS 应用程序的发布版本并让 Apple 的 Application Loader 找到它?

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

How do I build the release version of my iOS app and get Apple's Application Loader to find it?

iosxcode

提问by Roger

Is there a guide anywhere for how to build the release version of an iOS app binary for delivery to Apple? I've entered my app's metadata into Apple's "iTunes Connect" website, and I've downloaded Apple's "Application Loader" program.

是否有关于如何构建 iOS 应用程序二进制文件的发布版本以交付给 Apple 的指南?我已经将我的应用程序的元数据输入到 Apple 的“iTunes Connect”网站,并且我已经下载了 Apple 的“Application Loader”程序。

When I run the Application Loader, it correctly displays the app's metadata and gives me a "Choose..." button. I can find no documentation on Apple's site for what I'm supposed to be choosing.

当我运行 Application Loader 时,它会正确显示应用程序的元数据并给我一个“选择...”按钮。我在 Apple 的网站上找不到关于我应该选择什么的文档。

From looking around the web, apparently I'm supposed to choose the XXXX.app file, whose location I can find through "Show in Finder" by right-clicking on the .app file in XCode. However, the "Choose..." pop-up navigator won't let me get anywhere near that folder. I tried copying the .app file into my home directory, and from there the "Choose..." window shows the .app file, but it's grayed out.

环顾网络,显然我应该选择 XXXX.app 文件,我可以通过右键单击 XCode 中的 .app 文件,通过“在 Finder 中显示”找到其位置。但是,“选择...”弹出式导航器不会让我靠近该文件夹。我尝试将 .app 文件复制到我的主目录中,然后“选择...”窗口显示 .app 文件,但它是灰色的。

I also found sites saying that I have to sign my app before the "Choose..." window will accept it. I've tried various ways to do this but nothing is working.

我还发现网站说我必须在“选择...”窗口接受它之前签署我的应用程序。我尝试了各种方法来做到这一点,但没有任何效果。

I assume there's a guide for this somewhere that I just can't find? I've read through all of Apple's PDFs that I could find and I've come up with nothing, and my other web searches just give me bits and pieces, no actual procedure to follow.

我想在某个我找不到的地方有一个指南?我已经通读了我能找到的所有 Apple 的 PDF,但一无所获,而我的其他网络搜索只是给了我一些零碎的信息,没有实际的程序可循。

回答by jsd

There's a pretty comprehensive guide to iTunes Connect on the main page of the website. Unfortunately it is pretty out of date in respects to uploading your app. Application Loader isn't really needed anymore. With Xcode 4 the process is much simpler:

网站主页上有一份非常全面的 iTunes Connect 指南。不幸的是,它在上传您的应用程序方面已经过时了。不再需要应用程序加载器。使用 Xcode 4,过程要简单得多:

  1. Fill out all the info in iTunes Connect and click the "Ready To Upload Binary" button.
  2. In Xcode, use Product -> Archive to create an archive.
  3. When the Organizer opens showing your new archive, click Validate then enter your iTunes Connect info. It will make sure you didn't make any mistakes.
  4. If you pass Validation, click Distribute, then make sure Submit to the iOS App Store is selected and click Next. Enter your login info again, select a signing identity, and you're off to the races.
  1. 填写 iTunes Connect 中的所有信息,然后单击“准备上传二进制文件”按钮。
  2. 在 Xcode 中,使用 Product -> Archive 创建一个存档。
  3. 当管理器打开并显示您的新档案时,单击验证,然后输入您的 iTunes Connect 信息。它将确保您没有犯任何错误。
  4. 如果您通过验证,请单击分发,然后确保选择提交到 iOS App Store,然后单击下一步。再次输入您的登录信息,选择一个签名身份,然后您就可以参加比赛了。

回答by Hermann Klecker

For sumittion to iTunesConnect you should always use the most recent version of xcode.

对于 iTunesConnect,您应该始终使用最新版本的 xcode。

Currently xcode provides all you need. You do not have to launch the application loader manually. XCode does that for you.

目前 xcode 提供了你需要的一切。您不必手动启动应用程序加载器。XCode 为您做到了这一点。

Just select a device as build target. There is no need to actually attach a device. Then build an Archive. (Product/Archive - this will be disabled when your build target is a simulator) The organizer will open and there you press "submit".

只需选择一个设备作为构建目标。无需实际连接设备。然后建立档案。(产品/存档 - 当您的构建目标是模拟器时,这将被禁用)组织者将打开,您在那里按“提交”。

Before doing so you must have a provisioning profile and add that to the profiles in organizer. Make sure you have chosen an appropriate signing identity. (You will just run into an error right after submitting the app. Unlike other cases this time the error message is rather readable and understandable) Before submitting you will log on to itunes connect and prepare a data set with all required information. When you think you are ok with this then set it to "ready for upload" (or so) within iTunes connect.

在此之前,您必须有一个配置文件并将其添加到管理器中的配置文件中。确保您选择了合适的签名身份。(您将在提交应用程序后立即遇到错误。与其他情况不同,这次错误消息相当易读和易于理解)在提交之前,您将登录 iTunes 连接并准备一个包含所有必需信息的数据集。当您认为您对此没问题时,请在 iTunes 连接中将其设置为“准备上传”(左右)。

In the event that you manage more than one app (eg. a light and a full version) then process only one at a time. When submitting the app out of xcode there is a risk of selecting the wrong version. One app at a time does not create any more work but avoids errors. It even saves some time when you run into problems because then you have to re-do the work only once. :)

如果您管理多个应用程序(例如,轻量版和完整版),则一次只处理一个。从 xcode 提交应用程序时,存在选择错误版本的风险。一次一个应用程序不会创建更多的工作,但可以避免错误。当您遇到问题时,它甚至可以节省一些时间,因为这样您只需重新做一次工作。:)

Make sure debugging is turned off. (entitlements.plist)

确保调试已关闭。(权利.plist)

For the Build-Value I suggest to use a simple numeric value. Future updates must have a higher numeric value in here. The version string on the contrary, which is visible in the shop and to users, you may set to any value you like.

对于 Build-Value,我建议使用一个简单的数值。未来的更新必须在此处具有更高的数值。相反,在商店和用户中可见的版本字符串,您可以设置为您喜欢的任何值。

I think that is basically it.

我想基本上就是这样。