dSYM Upload
Upload a build's dSYMs so crash and error stack traces resolve to function names, files and line numbers, laid out by thread the way Xcode shows them.
A release build's crash keeps only addresses. With that build's dSYMs uploaded, Sophonz turns them into functions and source locations like GalleryView.body.getter (GalleryView.swift:42). dSYMs are kept under the app's app version and matched by the binary image UUIDs in the stack trace.
What gets resolved
| Data | Attribute | Contents |
|---|---|---|
| Crashes | spz.payload (KSCrash report) | Every thread, the crash reason (EXC_BREAKPOINT / SIGTRAP …), registers, binary images |
| Error logs | spz.stacktrace.ios | Frames of the thread that logged |
Every frame carries its image name, image UUID, load address and instruction address, so the app and each framework it embeds are resolved with their own dSYM.
Apple system frameworks (UIKit, SwiftUICore, libswiftCore.dylib …) need no upload. The symbol the device recorded is Swift-demangled and shown as a readable name such as Array.subscript.getter.
Producing dSYMs
In the Release configuration, check that Build Settings > Debug Information Format is DWARF with dSYM File. It is the default for new Xcode projects.
DEBUG_INFORMATION_FORMAT = dwarf-with-dsymWhere the dSYMs end up depends on how you build:
| Build | dSYM location |
|---|---|
Xcode Archive / xcodebuild archive | <name>.xcarchive/dSYMs/ |
| Inside a Build Phase script | $DWARF_DSYM_FOLDER_PATH |
fastlane gym | <output directory>/<app>.app.dSYM.zip |
CAUTION — dSYMs are per build
Rebuilding the same source changes the UUIDs. Upload the dSYMs of the exact build you shipped, from the CI job that produced the archive.
Upload
Uploads need an app access token from Settings > project > app > Access tokens. The token is shown once.
@sophonz/cli
--file takes a .dSYM bundle, a directory holding bundles, or a zip. Given a directory, the CLI finds every .dSYM inside and uploads them as one zip.
export SOPHONZ_TOKEN=sophonz_pat_...
npx @sophonz/cli upload-dsym \
--file build/MyApp.xcarchive/dSYMs \
--version 1.4.0 \
--build-id 120| Option | Description |
|---|---|
-f, --file | .dSYM bundle, directory of bundles, or zip (required) |
-v, --version | App version: CFBundleShortVersionString (MARKETING_VERSION) |
-b, --build-id | Build number: CFBundleVersion (CURRENT_PROJECT_VERSION) |
-t, --token | Access token. Defaults to SOPHONZ_TOKEN |
--dry-run | Print what would be uploaded |
One of --version and --build-id is required. The SDK sends CFBundleShortVersionString as service.version, so the same value in --version puts the files under that version in Settings.
GitHub Actions
- name: Archive
run: |
xcodebuild archive \
-scheme MyApp -configuration Release \
-archivePath build/MyApp.xcarchive
- name: Upload dSYMs
env:
SOPHONZ_TOKEN: ${{ secrets.SOPHONZ_TOKEN }}
run: |
PLIST=build/MyApp.xcarchive/Products/Applications/MyApp.app/Info.plist
npx @sophonz/cli upload-dsym \
--file build/MyApp.xcarchive/dSYMs \
--version "$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' "$PLIST")" \
--build-id "$(/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' "$PLIST")"Xcode Build Phase
To upload from local archives too, add a Run Script to the target's Build Phases. The build machine needs Node.js 20 or later, and the token comes from the environment so it is never committed.
if [ "$CONFIGURATION" = "Release" ] && [ -n "$SOPHONZ_TOKEN" ]; then
npx @sophonz/cli upload-dsym \
--file "$DWARF_DSYM_FOLDER_PATH" \
--version "$MARKETING_VERSION" \
--build-id "$CURRENT_PROJECT_VERSION"
fiAdd ${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME} to the script's Input Files so it runs after the dSYM exists.
curl
A zipped dSYM can also be uploaded directly:
cd build/MyApp.xcarchive/dSYMs && zip -r ../../dSYMs.zip . && cd -
curl -X POST https://app.sophonz.ai/api/v1/mapping-files \
-H "Authorization: Bearer $SOPHONZ_TOKEN" \
-F type=DSYM \
-F version=1.4.0 \
-F buildId=120 \
-F file=@build/dSYMs.zipHow matching works
When a dSYM arrives, the UUIDs of the Mach-O images inside are recorded. Opening a stack trace looks up the dSYM whose UUID equals each frame's image UUID.
- Upload the app and its frameworks separately or together in one zip.
- Matching is by UUID, so the same build matches even under a different version string. The version organizes the list.
- A file with no UUID is refused with
422 mappingInvalid.
Checking
Settings > project > app > Mapping files lists the app's versions. The list fills in from telemetry; expand a version to see its dSYMs and image UUIDs. A version that has sent telemetry without a dSYM is flagged. Create a version ahead of release with Add version.
When a crash or error comes in, expand its row in Logs or Traces. The stack trace viewer is laid out like Xcode's debug navigator:
- The crash reason, signal and address are on top.
- The crashed thread comes first in the thread list, with an Only threads with app frames filter.
- Frames in the app's own binary stand out; runs of system frames are folded.
- Inlined functions expand into indented sub-rows.
- Binary images, Registers and Raw tabs, and a Symbolicated / Raw toggle to see the frames exactly as the device sent them.
Upload API
POST https://app.sophonz.ai/api/v1/mapping-files
Authorization: Bearer sophonz_pat_...
Content-Type: multipart/form-data| Field | Description |
|---|---|
type | DSYM |
file | A dSYM zip, or one DWARF binary |
version | App version |
buildId | Build number (optional) |
One of version and buildId is required. On success it returns 201 with the recorded UUIDs:
{
"file": {
"id": "cmu1...",
"type": "DSYM",
"version": "1.4.0",
"buildId": "120",
"fileName": "dSYMs.zip",
"debugIds": ["D8D5EDD1-CD2A-32DE-8184-0E016F60AAFB"]
}
}| Status | error | Cause |
|---|---|---|
401 | unauthorized | Token missing, invalid, expired or revoked |
400 | fileMissing / typeInvalid / versionRequired | Missing field |
413 | fileTooLarge | Larger than 500MB |
422 | mappingInvalid | No Mach-O image with a UUID found |
500 | storageFailed | The server could not store the file |