在 Xcode 中构建存档不会创建存档

发布于 2024-12-01 21:00:17 字数 384 浏览 5 评论 0原文

看来我所有的搜索都没有结果。了解我,这是我错过的一个愚蠢的复选框或下拉菜单。可能是我的安装问题?我需要卸载 Xcode 4 并重新安装吗?

我已经在网上和 SO 上完成了所有这些步骤、技巧和修复,但没有什么能让我更接近在我的管理器中弹出存档。当我查看构建的存档时,它只是一个零 k 文件。我构建成功,我将跳过安装更改为是和否......我做了我在网上找到的所有这些事情,我快疯了。我很确定我的证书都设置正确,我在被告知要检查的地方检查了一些东西。这让我发疯。我看到的 99% 的解决方案是:

“无论如何,在“跳过安装”中,将“发布”的值设置为“否”(帮助文档告诉你相反的)。一旦将其设置为“否”,存档您将立即看到您的应用程序出现在存档管理器中。”

好吧,它不起作用,或者之后的任何进一步的答案也不起作用。

It seems all my searches to figure this out are fruitless. Knowing me it's one stupid checkbox or pulldown I'm missing. Is it maybe my install? Do I need to uninstall Xcode 4 and reinstall?

I've gone through all these steps and tricks and fixes all over the net and on SO, yet nothing gets me closer to getting an archive to pop up in my organizer. When I go to look at the archive that was built, it's just a zero k file. I get a build succeed, I change skip install to both yes and no ... I do all these things I find on the net, I'm going crazy. I'm pretty sure my certificates are all set up correctly, I have things checked where I'm told to be checked. It's driving me crazy. 99% of the solutions I see are:

"Anyway, in the "Skip Install", set the value for "Release" as "NO" (the help doc told you the opposite). Once you set it to "NO", archive again. You'll immediately see your app showing up in the archive organizer."

Well, it's not working or any further answers after aren't either.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

伴我心暖 2024-12-08 21:00:17

Archive 似乎只包含那些设置为“安装”的构建产品,因此请确保在构建设置中停用Skip Install

  1. 转到 BuildSettings。
  2. 找到“跳过安装”。
  3. 对于释放选择“否”。

此外,Xcode 需要一个安装路径。对于应用程序,这通常是 /Applications,但是当例如构建插件时,您可能希望将其设置为 /,这会将构建产品放在存档的根目录中。请注意,您必须使用“真实”路径,而不是像 ~/Library 这样的相对路径。

Archive only seems to include those build products that are set to be "installed", so make sure that you deactivate Skip Install in your build settings:

  1. Go to BuildSettings.
  2. Find "Skip Install".
  3. Select "NO" for Release.

Additionally, Xcode needs an Install Path. For Applications this is usually /Applications, but when e.g. building a plugin you might want to set this to just /, which will put the build product in the root of your archive. Note that you must use a "real" path, not a relative one like ~/Library.

寂寞花火° 2024-12-08 21:00:17

确保您使用“产品”>“存档,而不是产品>构建>档案。

Make sure you use Product > Archive, instead of Product > Build For > Archive.

欢你一世 2024-12-08 21:00:17

我更新到 High Sierra 后遇到了这个问题。我转到我的库文件夹。 /用户/your_user/Library/Developer/Xcode/Archives
该文件夹中有一个空文件夹,以我创建此存档的日期命名。但文件夹是空的。我删除了该文件夹并再次存档。这为我解决了这个问题。

I had this issue after I updated to High Sierra. I went to my library folder. /Users/your_user/Library/Developer/Xcode/Archives
In this folder was an empty folder named to the date I had created this archive. But the folder was empty. I removed the folder and archived again. That fixed the issue for me.

老街孤人 2024-12-08 21:00:17

对我来说,我还必须将以下空白构建设置更改为...

"Installation Directory" --> /Applications

最后,它开始出现在组织者/档案中。

PS 有趣的是,如果没有此设置,则会创建旧的存档文件,但它始终是空的。

For me, I had to also change the following blank build setting, to something like...

"Installation Directory" --> /Applications

Finally, it started appearing in Organizer/Archives.

P.S. Interestingly, without this setting the old archive file was being created, but it was always empty.

送君千里 2024-12-08 21:00:17

我刚刚遇到了这个问题,为我解决的方法是:

  1. 验证版本上的代码签名是否设置为您的分发配置文件。我这样做了,它实际上在某一时刻恢复了它。确保该设置未恢复,然后重试。
  2. 您提到“跳过安装”值,我也有类似的结果。设置为“是”将不会打开存档列表,设置为“否”则会打开存档列表。

希望这会有所帮助(比上面#1 更有帮助)。

I just had this issue and what resolved it for me was this:

  1. Verify Code Signing on the release is set to your Distribution Profile. I did this and it actually reverted it at one point. Make sure that setting wasn't reverted and try again.
  2. You mentioned the "Skip Install" value, I also had similar results. Setting to YES would not open the archive list, setting to NO would.

Hope this helps (more that #1 above helps).

深居我梦 2024-12-08 21:00:17

通过此清单,您应该在某处找到答案:

  1. 创建一个标记为“[App name]-AppStore”的新方案
  2. 通过复制发布创建一个标记为“Distribution”的构建配置
    • 点击项目,然后点击“信息”选项卡中构建配置下的 +。
  3. 将存档设置为在新方案下构建为“分发”
  4. 验证所有证书
  5. 验证所有配置文件
  6. 在钥匙串中验证您姓名下的私钥。 (在系统钥匙串中)
  7. 确保在分发代码签名中,您将配置文件设置为所有签名实例中的 iPhone/iPad 分发配置文件。
  8. 确保在您的项目信息中,将分发代码签名设置为您的 iPhone/iPad 分发配置文件。
  9. 确保您可以在目标的构建设置中将“跳过安装”选项设置为“NO”以进行分发。
  10. 确保您当前选择的方案是“[App Name]-AppStore > iOS Device”
  11. 如果没有其他情况,请清理所有构建,删除所有旧的存档尝试,构建存档,如果没有其他错误,请再次尝试存档。我遇到的一个问题是当我让 XCode 始终允许使用我的私钥进行签名时。只需删除它并重新下载证书就会迫使 XCode 重新要求我允许代码签名。我现在只点击允许,之后再也没有遇到过这个问题。

如果问题仍然存在,则应删除所有配置、吊销所有证书、重新颁发所有证书,然后重新安装所有证书。之后尝试重置代码签名,如果仍然不起作用,请使用 Apple 开发支持为您提供的两个免费 TSI 之一。如果没有任何效果,我相信他们可以为您解决。

希望这有帮助。

Go through this checklist, and you should find an answer somewhere:

  1. Create a new scheme labeled "[App name]-AppStore"
  2. Create a build configuration labeled "Distribution" by duplicating release
    • Click the project and hit the + under build configurations in the "Info" tab.
  3. Set the archive to build as "Distribution" under the new scheme
  4. Verify all certificates
  5. Verify all provisioning profiles
  6. Verify your private key under your name in your keychain. (in the system keychain)
  7. Make sure that in the Distribution code signing, you are setting the profile to your iPhone/iPad distribution profile in ALL signing instances.
  8. Make sure that in your project info, the Distribution code signing is set to your iPhone/iPad distribution profile.
  9. Make sure that you have the option, skip install, in build settings of your target set to "NO" for Distribution.
  10. Make sure that your currently selected scheme is "[App Name]-AppStore > iOS Device"
  11. If nothing else, clean all builds, delete all old archive attempts, build for archiving, and if there are no other errors, try archiving again. One problem that I ran into was when I let XCode always allow signing with my private key. Simply deleting that and redownloading the certificates forced XCode to re-ask me to allow code signing. I only click allow now and I haven't had that problem ever again.

If you are still having problems, you should delete all of your provisioning, revoke all of your certificates, reissue them all, and reinstall them all. Try resetting your code signing after that, and if it still doesn't work, use one of your two free TSIs given to you by Apple Dev Support. If nothing works, they can fix it for you I'm sure.

Hope this helps.

树深时见影 2024-12-08 21:00:17

我做了以下工作以使其对我有用:

  1. 我使用 替换了我拥有的一些子项目/静态库(即 Three20) cocoapods 将文件包含在主项目中..它刚刚摆脱了 Three20 给我带来的所有麻烦(而且它们很多..)
  2. 在所有其他子项目/静态的构建设置下将跳过安装设置为 yes库和切换在构建阶段从公共到项目的复制头
  3. 最重要的是:在子库下。在构建阶段我确保复制文件目的地从绝对路径更改产品目录

就是这样!

提示:要了解导致存档创建存档文件而不是 ipa 的违规文件,请执行以下操作:

  1. 选择存档并单击“分发”按钮。
  2. 选择“保存内置产品”选项。
  3. 点击下一步并保存。
  4. 在 Finder 中浏览创建的目录。
  5. “libraries”子目录将标识您需要将“跳过安装”设置为“是”的库。
  6. 在某些情况下,usr/local/include 将识别您需要从公共移动到项目的罪魁祸首文件,或者您必须从绝对路径更改为产品目录的文件。但该目录(即 usr/local/include)根据您的子库目录结构而有所不同

I did the following to make it work for me:

  1. I replaced some subprojects/static libraries i had (ie three20) by using cocoapods to include the files within the main project.. it just got rid of all the trouble three20 was giving me (and they are lots..)
  2. set skip install to yes under build settings for all other sub projects/static libraries and switched the copy headers from public to project under build phases
  3. most importantly: under the sub libraries.. under build phases i ensured that copy files destination was changed from Absolute path to products directory.

and that was it!

hint: to get an idea of the offending files that's causing your archive to create an archive file rather than an ipa do this:

  1. Select the archive and click the Distribute button.
  2. Select the 'Save Built Products' option.
  3. Hit Next and Save.
  4. Browse the created directory in Finder.
  5. The 'libraries' subdirectory will identify the libraries that you need to set the Skip Install to Yes.
  6. in some cases usr/local/include will identify the culprit header files you need to move from Public to Project or the files that you have to change from absolute path to products directory. but that directory (ie usr/local/include) varies depending on your sublibrary directory structure
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文