dSYM file not copied into archive

Hey,

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

When archiving to upload beta builds to TestFlight, the dSYMsdirectory 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 :

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.

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”

4 Likes

Hey @jpo !

Thanks, you were right. I simply added :

XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR "$(inherited)"

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

Thanks a ton !

E.

2 Likes

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?

I’ve just started getting this with Projucer also.

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

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.)

1 Like

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

1 Like