Carthage support is incomplete, dSYMs not included in builds

[Sorry in advance about the broken links. I’m new and can only post 2 links so you have to copy & paste a bunch of these URLs]

The Intercom SDK isn’t using Carthage’s binary support which means that dSYMs are dropped on the floor during builds.

Carthage documentation: https://github.com/Carthage/Carthage#archive-prebuilt-frameworks-into-one-zip-file

Example of a binary SDK: https://github.com/Instabug/Instabug-iOS and “raw . githubusercontent . com / Instabug/Instabug-iOS/master/Instabug.json”

Because of this the Carthage instructions are incomplete if you want to have the dSYMs included in the built products directory and thus uploaded to crash reporting services and to App Store Connect so that they can be downloaded from Xcode later on. The best way to do this is to package up a zip file for Carthage and include a JSON map of versions to zip file URLs so we can use a line like to install Intercom:

binary "hxxps://raw.githubusercontent.com/intercom/intercom-ios/master/Intercom.json"

We’re currently working around this problem by copying Intercom.framework manually from Carthage/Checkouts in our build phase script, but such measures shouldn’t be necessary.

If anyone else is looking for a workaround you can remove Intercom.framework from the input files to your Carthage build phase script and then include the following line in the script instead:

# Intercom's dSYMs only live in the checkouts directory so copy it from there instead of the build directory.
SCRIPT_INPUT_FILE_COUNT=1 SCRIPT_INPUT_FILE_0=\"${SRCROOT}/Carthage/Checkouts/intercom-ios/Intercom.framework\" /usr/local/bin/carthage copy-frameworks