# dSYM file not copied into archive

**URL:** <https://forum.juce.com/t/dsym-file-not-copied-into-archive/55396>\
**Category:** MacOSX and iOS\
**Created:** [March 16, 2023, 1:42pm UTC](https://forum.juce.com/t/dsym-file-not-copied-into-archive/55396 "2023-03-16T13:42:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![eggnog](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/eggnog/32/12211_2.png) [@eggnog](https://forum.juce.com/u/eggnog)\
**Post date:** [March 16, 2023, 1:42pm UTC](https://forum.juce.com/t/dsym-file-not-copied-into-archive/55396/1 "2023-03-16T13:42:32Z")

</div>

Hey,

I use CMake to generate iOS/macOS Xcode projects for my standalone app.

When archiving to upload beta builds to TestFlight, the `dSYMs`directory in the `.xcarchive` is simply empty.

The dSYM file is properly generated but it seems it’s not copied into the archive folder.

I read various forums and threads about this but I cannot figure out a solution.

I tried various flags combinations in my `CMakeLists.txt` but so far I can’t get it to work properly.

So far I have :

```auto
set_target_properties(${TARGET_NAME} PROPERTIES
    # [...] other non-related properties
    XCODE_ATTRIBUTE_SKIP_INSTALL "NO"
    XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
    XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS "YES"
    XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING "YES"
    XCODE_ATTRIBUTE_ENABLE_STDEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
    #XCODE_ATTRIBUTE_DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT "YES"

```

The dSYM is properly created in the current CMake build artifacts directory, it’s just not copied in the archive.

Also, when I set `XCODE_ATTRIBUTE_DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT` to `YES`, the archive is somewhat corrupt but the dSYM file is included right where the .app file is, which isn’t even where it should be placed.

I’m using CMake 3.24.2 and Xcode 14.2 on a Mac M1 running macOS Ventura 13.2.1, and JUCE 7.0.4.

What am I missing ?

Thanks in advance.

E.

---

<div class="post-metadata">

**Author:** ![jpo](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jpo/32/503_2.png) [@jpo](https://forum.juce.com/u/jpo)\
**Post date:** [March 16, 2023, 5:30pm UTC](https://forum.juce.com/t/dsym-file-not-copied-into-archive/55396/2 "2023-03-16T17:30:03Z")

</div>

I had the same issue – with the Projucer. It seems it is the unusual (but convenient) “Binary Location” used by the projucer (I’m not using CMake, but I guess the root cause is the same) which is confusing xcode. Changing “Binary Location” to “$(BUILD\_DIR)/$(CONFIGURATION)” fixed the issue for me.

I think in XCode , the “Binary Location” of projucer is the setting named “CONFIGURATION\_BUILD\_DIR”

---

<div class="post-metadata">

**Author:** ![eggnog](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/eggnog/32/12211_2.png) [@eggnog](https://forum.juce.com/u/eggnog)\
**Post date:** [March 16, 2023, 5:52pm UTC](https://forum.juce.com/t/dsym-file-not-copied-into-archive/55396/3 "2023-03-16T17:52:02Z")

</div>

Hey @jpo !

Thanks, you were right. I simply added :

```auto
XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR "$(inherited)"

```

and now the dSYM file is properly bundled with the archive.

Thanks a ton !

E.

---

<div class="post-metadata">

**Author:** ![eyalamir](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/eyalamir/32/2978_2.png) [@eyalamir](https://forum.juce.com/u/eyalamir)\
**Post date:** [December 25, 2025, 2:20am UTC](https://forum.juce.com/t/dsym-file-not-copied-into-archive/55396/4 "2025-12-25T02:20:32Z")

</div>

Sorry to resurrect an old thread - I was trying to use the flags mentioned here and wasn’t able to get the DSYM files copied to the archive even after setting `XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR`.

Does anyone have an updated set of flags that they’re using in their CMake project?

---

<div class="post-metadata">

**Author:** ![leehu](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/leehu/32/3280_2.png) [@leehu](https://forum.juce.com/u/leehu)\
**Post date:** [December 28, 2025, 9:09pm UTC](https://forum.juce.com/t/dsym-file-not-copied-into-archive/55396/5 "2025-12-28T21:09:09Z")

</div>

I’ve just started getting this with Projucer also.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/juce/original/3X/4/8/484d4c0d6fdfcc93a7c4f7e828a12d805db92017.png)

---

<div class="post-metadata">

**Author:** ![kerfuffle](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/kerfuffle/32/11805_2.png) [@kerfuffle](https://forum.juce.com/u/kerfuffle)\
**Post date:** [December 28, 2025, 10:02pm UTC](https://forum.juce.com/t/dsym-file-not-copied-into-archive/55396/6 "2025-12-28T22:02:29Z")

</div>

For Projucer it’s simply a matter of going to the iOS Release config, add this to Custom Xcode Flags:

```auto
GCC_GENERATE_DEBUGGING_SYMBOLS=YES, DEBUG_INFORMATION_FORMAT=dwarf-with-dsym

```

Also set Binary Location in the iOS Exporter/Release to `$(BUILD_DIR)/$(CONFIGURATION)` so that the dSYM files actually end up in the xcarchive.

(These things were mentioned above already but I figured I would summarize them.)

---

<div class="post-metadata">

**Author:** ![eyalamir](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/eyalamir/32/2978_2.png) [@eyalamir](https://forum.juce.com/u/eyalamir)\
**Post date:** [December 29, 2025, 10:57pm UTC](https://forum.juce.com/t/dsym-file-not-copied-into-archive/55396/7 "2025-12-29T22:57:53Z")

</div>

> [@kerfuffle](#):
>
> Also set Binary Location in the iOS Exporter/Release to `$(BUILD_DIR)/$(CONFIGURATION)` so that the dSYM files actually end up in the xcarchive.

Thank you! Does anyone know of a good way to set this binary location correctly in CMake (for both the standalone and AUv3 targets)?
