如何为 itunes 商店构建 xcode 项目?

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

How do I build an xcode project for the itunes store?

iphonexcodebinaryitunesexecutable

提问by Mark Kaminsky

I've got my apps running on my iphone, great, however to list on the itunes store I need the "universal binary" thing.

我已经在我的 iphone 上运行了我的应用程序,很棒,但是要在 iTunes 商店中列出我需要“通用二进制”的东西。

I've tried finding answers, but I can't seem to find a concise useable explanation to doing this in xcode. I always get errors when I try to build a binary. Can anyone point me towards a basic step-by-step procedure I can follow to creating a universal executable binary which can be uploaded on the itunes store?

我试过寻找答案,但我似乎无法找到在 xcode 中执行此操作的简明可用解释。当我尝试构建二进制文件时,我总是遇到错误。任何人都可以指出我可以遵循的基本分步过程来创建可以上传到iTunes商店的通用可执行二进制文件吗?

One more thing, is there some type of app, like the rename project app, or applescript thing, that can do this for me with a few clicks?

还有一件事,是否有某种类型的应用程序,例如重命名项目应用程序或 applescript 的东西,只需单击几下就可以为我完成此操作?

回答by Simon Woodside

Try this:

尝试这个:

Prepare a new provisioning profile for App Store

为 App Store 准备新的配置文件

  1. Make sure you have Ad Hoc distribution working OK.
  2. Go onto the Program Portal > Provisioning > Distribution
  3. New Profile button
  4. Distribution Method: App Store
  5. Profile Name: MyApp App Store (or whatever)
  6. App ID: MyApp (you have already created one right?)
  7. Submit button
  1. 确保您的 Ad Hoc 分发工作正常。
  2. 进入程序门户 > 供应 > 分发
  3. 新建配置文件按钮
  4. 分发方式:App Store
  5. 个人资料名称:MyApp App Store(或其他)
  6. App ID:MyApp(你已经创建了一个吧?)
  7. 提交按钮

Set up the new profile/configuration in XCode

在 XCode 中设置新的配置文件/配置

  1. Download the certificate (you can click on the Distribution tab to reload that tab while it's being generated) and load it into XCode
  2. In XCode, open your project and go to Project > Edit Project Settings (or double-click on the first item under Groups & Files panel)
  3. Configurations tab, click on your existing Ad Hoc distribution configuration, that already works, and click Duplicate button. Call the new one "App Store"
  4. Click on Build tab, then under Code Signing > Code Signing Entity in the popup choose "iPhone Distribution - MyCompanyName" under "MyApp App Store"
  1. 下载证书(您可以单击分发选项卡在生成时重新加载该选项卡)并将其加载到 XCode 中
  2. 在 XCode 中,打开您的项目并转到 Project > Edit Project Settings(或双击 Groups & Files 面板下的第一项)
  3. Configurations 选项卡,单击您现有的 Ad Hoc 分发配置,已经可以使用,然后单击 Duplicate 按钮。称新的“App Store”
  4. 单击 Build 选项卡,然后在弹出窗口中的 Code Signing > Code Signing Entity 下选择“MyApp App Store”下的“iPhone Distribution - MyCompanyName”

Build & Upload to iTunes Connect

构建并上传到 iTunes Connect

  1. Clean all for good luck, then set Active Configuration to "App Store", build & go. Test it on your iPhone.
  2. Find your built app in the Finder, in your project directory > build > App Store-iphoneos > MyApp.app ... right click and "Compress MyApp.app"
  3. Upload resulting MyApp.zip to iTunes Connect.
  1. 清理所有好运,然后将 Active Configuration 设置为“App Store”,构建并运行。在您的 iPhone 上进行测试。
  2. 在 Finder 中找到您构建的应用程序,在您的项目目录 > build > App Store-iphoneos > MyApp.app ... 右键单击​​并“压缩 MyApp.app”
  3. 将生成的 MyApp.zip 上传到 iTunes Connect。

回答by Mark Bessey

A Universal Binary has nothing to do with it. To distribute through the App Store, you need to create a Distribution provisioning profile. The iPhone developer portal has step-by-step directions for this. look under the "Distribution" tab.

通用二进制与它无关。要通过 App Store 分发,您需要创建分发配置文件。iPhone 开发者门户网站有这方面的分步指导。在“分发”选项卡下查看。

回答by strave

I followed the instructions listed by sbwoodsidebut had problems with the last part (Build & Upload to iTunes Connect). I realized that the built version didn't run on the device. This is what worked for me:

我按照sbwoodside列出的说明进行操作,但在最后一部分(构建并上传到 iTunes Connect)时遇到了问题。我意识到内置版本没有在设备上运行。这对我有用:

Build & Upload to iTunes Connect

构建并上传到 iTunes Connect

  • Clean all for good luck.
  • Go to "Edit Scheme" and in the Archive menu, select the App Store build configuration.
  • Select iOS Device or a specific device in the drop down menu and go to Product->Archive.
  • Once Xcode is done archiving, it will open the organizer window and show the archives section. Select the last archive and click "Submit".
  • You will be asked to enter your distribution certificate. Select the one created for the App Store.
  • XCode will upload the app to iTunes Connect without the need of using Application Loader. For this to work, the app has to be in "Ready to Upload" status in iTunes Connect.
  • 清洁一切以求好运。
  • 转到“编辑方案”并在“存档”菜单中,选择 App Store 构建配置。
  • 在下拉菜单中选择 iOS 设备或特定设备,然后转到产品->存档。
  • Xcode 完成存档后,它将打开管理器窗口并显示存档部分。选择最后一个存档并单击“提交”。
  • 您将被要求输入您的分发证书。选择为 App Store 创建的那个。
  • XCode 将应用程序上传到 iTunes Connect,无需使用 Application Loader。为此,该应用程序必须在 iTunes Connect 中处于“准备上传”状态。

You won't get to test the last version with the device. Therefore it's best to make an ad hoc version before to be able to test all features and once everything is working, duplicate the ad hoc configuration for the app store.

您将无法使用该设备测试最新版本。因此最好在能够测试所有功能之前制作一个临时版本,一旦一切正常,复制应用商店的临时配置。

回答by OhioDude

Once you have your provisioning profiles downloaded and installed you need to make some changes within XCode to get the app to work on your iPhone and eventually to submit to the iTunes store. You'll also need to add an Entitlemests.plist object to your project. You also need to tweak your build profile and your info.plist to point to your application name.

一旦您下载并安装了您的配置文件,您需要在 XCode 中进行一些更改以使应用程序在您的 iPhone 上运行并最终提交到 iTunes 商店。您还需要将 Entitlemests.plist 对象添加到您的项目中。您还需要调整您的构建配置文件和 info.plist 以指向您的应用程序名称。

But as Mark B already said, just got through the developer portal and follow those instructions. Just make sure your define the right provisioning profile for the purpose.

但正如 Mark B 已经说过的,只需通过开发人员门户并按照这些说明进行操作。只需确保您为此目的定义了正确的配置文件。