Xcode 6 GM 创建存档

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

Xcode 6 GM creating archive

iosxcodexcode6ipaad-hoc-distribution

提问by steventnorris

I am attempting to create an archive .ipa for distribution via testflight. The archive creates, and I choose export, then choose ad hoc, then select my team. However, at this point I get the below screen.

我正在尝试创建一个存档 .ipa 以通过 testflight 进行分发。存档创建,我选择导出,然后选择临时,然后选择我的团队。但是,此时我得到以下屏幕。

enter image description here

在此处输入图片说明

I know that my certificate is valid, as I created an .ipa in xcode 5 with a different provisioning profile about 2 hours before I downloaded xcode 6 GM. I also know that my provisioning profile is valid and connected to said certificate.

我知道我的证书是有效的,因为我在下载 xcode 6 GM 前大约 2 小时用不同的配置文件在 xcode 5 中创建了一个 .ipa。我也知道我的配置文件是有效的并连接到所述证书。

Thing is, in xcode 5 it didn't ask for a team; it only asked for a provisioning profile. Now, export asks for a team, which I provide. Also, of course I have a valid iOS Distribution certificate. I'm using it in the build settings to sign my application. Seems like a strange error to get

问题是,在 xcode 5 中,它没有要求团队;它只要求提供配置文件。现在,export 需要一个我提供的团队。另外,当然我有一个有效的 iOS 分发证书。我在构建设置中使用它来签署我的应用程序。似乎是一个奇怪的错误

Any help would be greatly appreciated.

任何帮助将不胜感激。

采纳答案by steventnorris

Using a development certificate, I was unable to generate an .ipa. However, using a distribution certificate for ad hoc, I could generate an .ipa. I'm assuming this is either a new 'feature' or a bug in Xcode 6 that requires ad hoc to have a distribution certificate and profile to deploy via ad hoc.

使用开发证书,我无法生成 .ipa。但是,使用临时分发证书,我可以生成一个 .ipa。我假设这是 Xcode 6 中的一个新“功能”或一个错误,需要临时拥有分发证书和配置文件才能通过临时部署。

回答by Bruno Bronosky

You have to change your "Code Signing Identity" to "iOS Distribution"

您必须将“代码签名身份”更改为“iOS 分发”

First of all understand that the error message is a BS repurposed message and not accurate to what is happening here. It's not your fault you have wasted so much time on this. This is an example of 1 small flaw in Apple's workflow costing hundreds of thousands of dollars in wasted developer time. But what can we do?

首先要了解错误消息是 BS 重新调整用途的消息,与此处发生的情况不准确。你在这上面浪费了这么多时间,这不是你的错。这是 Apple 工作流程中的 1 个小缺陷的一个示例,它浪费了数十万美元的开发人员时间。但是我们能做什么呢?

  1. Make sure you have a VALID Provisioning Profile for Ad Hoc distribution in Developer Member Center and download it to your Mac. (This is an important detail as you probably didn't have one of these prior to Xcode 6 because it wasn't required.)
  2. Open the *.mobileprovision file by dragging it to the Xcode icon in your dock.
  3. In Xcode go to Build Settings and find "Code Signing Identity" under "Code Signing".
  4. It's probably going to be set to "iPhone Developer". Change it to "iOS Distribution", even though that sounds like you're making an App Store build.
  5. Find "Provisioning Profile" in Xcode under "Code Signing". Make sure that your Ad Hoc provisioning profile is present in the dropdown list, but select Automatic.
  6. Now you can do: Product > Build; Product > Archive; Export...; And all should be well.
  1. 确保您在 Developer Member Center 中拥有用于 Ad Hoc 分发的 VALID Provisioning Profile,并将其下载到您的 Mac。(这是一个重要的细节,因为在 Xcode 6 之前您可能没有这些细节,因为它不是必需的。)
  2. 通过将 *.mobileprovision 文件拖到 Dock 中的 Xcode 图标来打开它。
  3. 在 Xcode 中,转到 Build Settings 并在“Code Signing”下找到“Code Signing Identity”。
  4. 它可能会被设置为“iPhone Developer”。将其更改为“iOS Distribution”,即使这听起来像是在构建 App Store。
  5. 在 Xcode 中的“Code Signing”下找到“Provisioning Profile”。确保您的 Ad Hoc 配置文件出现在下拉列表中,但选择自动。
  6. 现在你可以做:产品>构建;产品 > 存档;出口...; 一切都应该很好。

Xcode 6

Xcode 6

This is technically the same idea as @steventnorris. I wanted to be more clear because I failed recognize and implement his answer. I had to discover this on my own through much trial and error.

这在技术上与@steventnorris 的想法相同。我想说得更清楚,因为我未能识别和实施他的回答。我必须通过多次反复试验自己发现这一点。

回答by André Gustavo Espeiorin

The only way I could generate the AdHoc build (without getting rid of my certificates) was using the command line tool xcbuild as described here:

我可以生成 AdHoc 构建(不删除我的证书)的唯一方法是使用命令行工具 xcbuild,如下所述:

https://stackoverflow.com/a/25979784/2008167

https://stackoverflow.com/a/25979784/2008167

回答by Garnik

For me worked following.

对我来说,工作如下。

  1. Delete distribution profiles from developer portal.
  2. Create new one
  3. Clear and re-archive
  1. 从开发人员门户删除分发配置文件。
  2. 创建新的
  3. 清除并重新存档

回答by MB_iOSDeveloper

For me the following worked instantly:

对我来说,以下工作立即生效:

  1. Go to keychain access

  2. Delete the trash keys that Xcode or last Mac OS update recovered.

  3. Leave only the "public key" with the "private keys" which contain a litte triangle beside them (which when clicked shows the certificate).

  1. 转到钥匙串访问

  2. 删除 Xcode 或上次 Mac OS 更新恢复的垃圾键。

  3. 只留下“公钥”和“私钥”,其中包含旁边的小三角形(单击时会显示证书)。

After deleting these thrash keys Xcode 6.0.1. managed to archive a add hoc app for OTA distribution.

Xcode 6.0.1 删除这些 thrash 键后。设法存档了用于 OTA 分发的附加应用程序。

This helped me, hope it helps you guys. Gl :)

这对我有帮助,希望对你们有帮助。格:)

回答by Qamar Suleiman

This is what worked for me. Hope it helps

这对我有用。希望能帮助到你

  1. Delete both the Dev and AdHoc profiles for the particular application from your Mac. (I use Configuration Utility for that)
  2. Quit and then Launch Xcode
  3. Download the provisioning profiles from Apple Dev Portal
  4. Select the new Provisioning from Code Sign Settings
  1. 从 Mac 中删除特定应用程序的 Dev 和 AdHoc 配置文件。(我为此使用配置实用程序)
  2. 退出然后启动 Xcode
  3. 从 Apple Dev Portal 下载配置文件
  4. 从代码签名设置中选择新的供应

回答by Jason

Here's the short version of what worked for me (naturally I had spent hours trying everything else first):

这是对我有用的简短版本(当然,我首先花了数小时尝试其他所有内容):

NOTE: Instructions are for Xcode 6.3.2.

注意:说明适用于 Xcode 6.3.2。

  1. Create and install new distribution certificate.
  2. Uninstall old certificate.
  3. Switch provisioning profile to new cert.
  4. Perform Archive. If you're okay with changing your cert, feel free to stop here.
  5. Switch provisioning profile back to original cert.
  6. Perform Archive. Should now work.
  1. 创建并安装新的分发证书。
  2. 卸载旧证书。
  3. 将配置文件切换到新证书。
  4. 执行存档。如果您可以更改证书,请随时到此为止。
  5. 将配置文件切换回原始证书。
  6. 执行存档。现在应该可以工作了。

Here's the long, detailed version:

这是长而详细的版本:

  1. Delete the existing Distribution certificate in your Keychain.
  2. Create a new Distribution certificate in the Apple Member Center.
  3. Download and install the new certificate.
  4. Change the project AdHoc provisioning profile to use this new certificate.
  5. In Xcode, click Preferences in the Xcode menu.
  6. Click View Details...
  7. Right Click a provisioning profile at the bottom and choose Show in Finder.
  8. Delete all files in that folder.
  9. Click the refresh button at the bottom of the window in Xcode.
  10. Attempt the Archive again, it should work. Stop here if you're okay with changing certificates regularly.
  11. Delete the new certificate from your Keychain and reinstall the old one.
  12. Change the provisioning profile back to the original certificate.
  13. Repeat the deleting and refreshing of the provisioning profiles.
  14. Attempt the Archive again, it should work. Upload this version.
  1. 删除钥匙串中的现有分发证书。
  2. 在 Apple 会员中心创建新的分发证书。
  3. 下载并安装新证书。
  4. 更改项目 AdHoc 配置文件以使用此新证书。
  5. 在 Xcode 中,单击 Xcode 菜单中的首选项。
  6. 单击查看详细信息...
  7. 右键单击底部的配置文件,然后选择在 Finder 中显示。
  8. 删除该文件夹中的所有文件。
  9. 单击 Xcode 窗口底部的刷新按钮。
  10. 再次尝试存档,它应该可以工作。如果您可以定期更改证书,请到此为止。
  11. 从您的钥匙串中删除新证书并重新安装旧证书。
  12. 将配置文件更改回原始证书。
  13. 重复删除和刷新配置文件。
  14. 再次尝试存档,它应该可以工作。上传这个版本。