How to upload dSYM files to Sentry using the Workflow Editor

Last updated: July 13, 2026

You can upload iOS debug symbol files to Sentry from a Codemagic build configured with the Flutter Workflow Editor.

dSYM files allow Sentry to symbolicate iOS crash reports, replacing memory addresses with readable method and function names.

Configure Sentry credentials

Before adding the upload script, create the following environment variables in Codemagic:

  • SENTRY_ACCESS_TOKEN

  • SENTRY_ORGANIZATION_NAME

  • SENTRY_PROJECT_NAME

Mark the access token as secure.

The access token must have sufficient permission to upload debug information files to the selected Sentry organization and project.

Install the required Sentry tools

Add the installation command recommended for your project type to the post-clone script section.

Depending on the project, this may involve installing the appropriate Sentry SDK or making sentry-cli available during the build.

Refer to the Sentry documentation for the installation steps that apply to your framework.

Upload the dSYM files

Add the dSYM upload script to your codemagic.yaml configuration file or to your post-publish script in the Flutter workflow editor.

For a Flutter iOS build, an example script is:

dsymPath=$(find "$CM_BUILD_DIR/build/ios/archive/Runner.xcarchive" \
  -name "*.dSYM" | head -1)

if [[ -z "$dsymPath" ]]; then
  echo "No debug symbols were found. Skipping the Sentry upload."
else
  echo "Uploading debug symbols from $dsymPath to Sentry"

  sentry-cli \
    --auth-token "$SENTRY_ACCESS_TOKEN" \
    upload-dif \
    --org "$SENTRY_ORGANIZATION_NAME" \
    --project "$SENTRY_PROJECT_NAME" \
    "$dsymPath"
fi

Troubleshooting: no dSYM files found

If the build succeeds but the script reports that no debug symbols were found, first confirm the location of the generated Xcode archive.

Workflow Editor scripts run from the cloned repository directory, which is available through:

$CM_BUILD_DIR

This normally points to:

/Users/builder/clone

For a Flutter project located at the repository root, the archive may be generated at:

$CM_BUILD_DIR/build/ios/archive/Runner.xcarchive

However, if the Flutter project is stored in a subfolder, the project folder must also be included in the path.

For example, if the project is located in:

/Users/builder/clone/your-project-name

The archive may be located at:

/Users/builder/clone/your-project-name/build/ios/archive/Runner.xcarchive

Update the script accordingly:

dsymPath=$(find \
  "$CM_BUILD_DIR/your-project-name/build/ios/archive/Runner.xcarchive" \
  -name "*.dSYM" | head -1)

Replace your-project-name with the actual project directory.

You can also add the following temporary command to inspect the available archives and dSYM files:

find "$CM_BUILD_DIR" \( -name "*.xcarchive" -o -name "*.dSYM" \) -print

If no .dSYM files are returned, also verify that:

  • The iOS archive was generated successfully;

  • The build configuration generates dSYM files;

  • The archive path matches the structure of your project;

  • And the upload script runs after the archive has been created.

If necessary, you can use remote access to the build machine to find the correct path. More information can be found here.