xcode 无法将 dSYM 文件复制到存档中

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

Unable to copy dSYM file into archive

iphonexcodexcodebuild

提问by DerekH

Whenever I run 'build and archive' from XCode I get the following message:

每当我从 XCode 运行“构建和存档”时,我都会收到以下消息:



Unable to copy dSYM file into archive.

无法将 dSYM 文件复制到存档中。

Please make sure that your application has set the “Debug Information Format” build setting to “DWARF with dSYM File”.

请确保您的应用程序已将“调试信息格式”构建设置设置为“带有 dSYM 文件的 DWARF”。



I have checked my Debug format and it is set to the suggested value(DWARF with dSYM). Has anyone else ran into this issue, if so how did you fix it?

我已经检查了我的调试格式,它被设置为建议值(带有 dSYM 的 DWARF)。有没有其他人遇到过这个问题,如果有,你是如何解决的?

回答by Wilbo Baggins

Try setting 'Generate Debug Symbols' to true in the build settings of the target you're trying to build and archive.

尝试在您尝试构建和存档的目标的构建设置中将“生成调试符号”设置为 true。

This solved the issue for me!

这为我解决了这个问题!

回答by ABS

this worked for me ,i hope it help someone out there... Goto to the build setting and search for "Generate debug symbol" and set it to Yes.

这对我有用,我希望它可以帮助那里的人......转到构建设置并搜索“生成调试符号”并将其设置为是。

enter image description here

在此处输入图片说明

then search for debug information format in build setting and set "Debug information format"to "DWARF with dSYM file"

然后在构建设置中搜索调试信息格式并将“调试信息格式”设置“DWARF with dSYM file”

enter image description here

在此处输入图片说明

回答by Jens Kohl

I just ran into the same problem, but I had an build script which removed the dSYM file before Xcode could. So it wasn't there and that was what Xcode was crying about.

我刚刚遇到了同样的问题,但我有一个构建脚本,它在 Xcode 之前删除了 dSYM 文件。所以它不存在,这就是 Xcode 为之哭泣的地方。

I attached a screenshot, so perhaps the next one which runs into that problem can recover a bit quicker from that.

我附上了一张截图,所以也许下一个遇到这个问题的人可以从中恢复得更快一些。

Unable to copy dSYM file into archive

无法将 dSYM 文件复制到存档中

回答by Ecuador

The 'Generate Debug Symbols' solution worked for me as well. After it worked once, I disabled the setting again, and I build & archive worked again, producing a file smaller by 700kb than the debug symbols enabled version. Not sure if this is actual savings after the app is on the app store, but it doesn't hurt!

“生成调试符号”解决方案也适用于我。它工作一次后,我再次禁用了设置,我再次构建和存档工作,生成的文件比启用调试符号的版本小 700kb。不确定这是否是应用程序在应用程序商店上架后的实际节省,但它不会受到伤害!

回答by nikans

That's how your build settings for both release and debug configuration should look like:

这就是发布和调试配置的构建设置应如下所示:

  • Generate Debug Symbols → Yes
  • Debug Information... → DWARF with DSYM
  • Deployment Postprocessing → YES
  • Strip Linked Product... → No
  • Strip Debug... → No
  • 生成调试符号 → 是
  • 调试信息... → DWARF with DSYM
  • 部署后处理 → 是
  • 剥离链接产品... → 否
  • 剥离调试... → 否

If there's still no luck, try check the Report Navigator.

如果仍然没有运气,请尝试检查报告导航器。

The point is, dSYM file may be generated in another location, or not generated at all.

关键是,dSYM 文件可能在另一个位置生成,或者根本不生成。

In my case, the dSYM file has not been generated, and there hasn't been a corresponding line that goes like "Generate Appname.dSYM ...in {path}"But there's been Fabric installed, and it logged the fact of the dSYM file's absence:

就我而言,dSYM 文件尚未生成,也没有相应的行,"Generate Appname.dSYM ...in {path}"但已经安装了 Fabric,它记录了 dSYM 文件缺失的事实:

no dsym

没有 dsym

Just filer the Report Navigator by "dSYM".

只需通过“dSYM”对报告导航器进行归档。

If dSYM is not generated in appropriate folder

如果没有在适当的文件夹中生成 dSYM

Check environment variables, especially DWARF_DSYM_FOLDER_PATHand DWARF_DSYM_FILE_NAME.

检查环境变量,尤其是DWARF_DSYM_FOLDER_PATHDWARF_DSYM_FILE_NAME

To embed the dSYM within the app bundle, just set DWARF_DSYM_FOLDER_PATHto $(CONFIGURATION_BUILD_DIR)/$(EXECUTABLE_FOLDER_PATH)and DWARF_DSYM_FILE_NAMEto $(EXECUTABLE_NAME).dSYM

嵌入的dSYM应用程序包内,只设置DWARF_DSYM_FOLDER_PATH$(CONFIGURATION_BUILD_DIR)/$(EXECUTABLE_FOLDER_PATH)DWARF_DSYM_FILE_NAME$(EXECUTABLE_NAME).dSYM

Now the build should create dSYM for your target

现在构建应该为你的目标创建 dSYM

generate target.dSYM

生成目标.dSYM