12

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


Unable to copy dSYM file into archive.

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


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?

DerekH
  • 860
  • 5
  • 11

5 Answers5

22

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

This solved the issue for me!

Wilbo Baggins
  • 2,701
  • 3
  • 26
  • 39
  • I just looked this up the forth time (I always forget what flag to set with that error). Incredibly helpful this post, I wish I could vote more than one point. – Sven Hecht Aug 17 '11 at 16:15
  • Hi Sven, I thought the issue was no longer relevant in Xcode 4. Are you still on Xcode 3 or does this also apply to the new 4.x releases? Thanks for your kudos :)! – Wilbo Baggins Aug 22 '11 at 14:54
  • still on 3 so dont know if it's relevant for 4. I'll need to upgrade soon but I try to avoid that mid-project. – Sven Hecht Sep 08 '11 at 13:56
6

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"

enter image description here

ABS
  • 7,634
  • 1
  • 21
  • 20
3

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.

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

Jens Kohl
  • 5,899
  • 11
  • 48
  • 77
2

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!

Ecuador
  • 21
  • 1
1

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

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.

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:

no dsym

Just filer the Report Navigator by "dSYM".

If dSYM is not generated in appropriate folder

Check environment variables, especially DWARF_DSYM_FOLDER_PATH and DWARF_DSYM_FILE_NAME.

To embed the dSYM within the app bundle, just set DWARF_DSYM_FOLDER_PATH to $(CONFIGURATION_BUILD_DIR)/$(EXECUTABLE_FOLDER_PATH) and DWARF_DSYM_FILE_NAME to $(EXECUTABLE_NAME).dSYM

Now the build should create dSYM for your target

generate target.dSYM

nikans
  • 2,468
  • 1
  • 28
  • 35