iOS dSYM upload
Crash reports from release builds contain memory addresses, not function names. Appelium turns them into readable stack traces with your app's dSYM files, so upload the dSYMs of every build you distribute: App Store, TestFlight and ad hoc builds. Upload them once per archive, from the machine or CI job that creates it. Crash reports that arrived before the upload are symbolicated again within a few minutes.
Before you start
- Debug Information Format must be DWARF with dSYM File for the Release configuration. This is Xcode's default.
- You need a workspace API key from API Access Settings. This is not the SDK's application API key; see Authentication. Store it as a CI secret, for example in
APPELIUM_TOKEN. - You need the application alias shown in the application's settings in the Dashboard, for example
my-app-ios.
The dSYMs are uploaded as one .zip archive. Appelium reads the bundle identifier, version and build number from the dSYMs themselves, so no other parameters are needed.
Upload from the command line or CI
After xcodebuild archive, zip the archive's dSYMs folder and upload it:
ARCHIVE_PATH="build/MyApp.xcarchive"
ditto -c -k --keepParent "$ARCHIVE_PATH/dSYMs" dSYMs.zip
curl --fail-with-body -X POST "https://api.appelium.com/v2/symbolsFiles" \
-H "X-Appelium-Token: $APPELIUM_TOKEN" \
-H "X-Appelium-Application-Alias: my-app-ios" \
-H "Content-Type: application/zip" \
--data-binary @dSYMs.zip
Upload with fastlane
gym (build_app) leaves the zipped dSYMs next to the IPA. Upload them right after the build:
lane :release do
build_app(scheme: "MyApp")
dsym_path = lane_context[SharedValues::DSYM_OUTPUT_PATH]
sh(
"curl", "--fail-with-body", "-X", "POST", "https://api.appelium.com/v2/symbolsFiles",
"-H", "X-Appelium-Token: #{ENV['APPELIUM_TOKEN']}",
"-H", "X-Appelium-Application-Alias: my-app-ios",
"-H", "Content-Type: application/zip",
"--data-binary", "@#{dsym_path}"
)
upload_to_testflight
end
Upload from Xcode Cloud
Add the token as a secret environment variable named APPELIUM_TOKEN to your workflow, then create ci_scripts/ci_post_xcodebuild.sh next to your project:
#!/bin/sh
set -e
if [ -n "$CI_ARCHIVE_PATH" ]; then
ditto -c -k --keepParent "$CI_ARCHIVE_PATH/dSYMs" /tmp/dSYMs.zip
curl --fail-with-body -X POST "https://api.appelium.com/v2/symbolsFiles" \
-H "X-Appelium-Token: $APPELIUM_TOKEN" \
-H "X-Appelium-Application-Alias: my-app-ios" \
-H "Content-Type: application/zip" \
--data-binary @/tmp/dSYMs.zip
fi
Make the script executable with chmod +x ci_scripts/ci_post_xcodebuild.sh.
Troubleshooting
- 401 Unauthorized: the token is missing or invalid. Use a workspace API key, not the SDK's application API key.
- Frames are still unsymbolicated: check that the uploaded dSYMs belong to the exact build in the report. Every archive gets new dSYMs, even without code changes.
- Frameworks show addresses: include the dSYMs of your embedded frameworks. An archive's
dSYMsfolder already contains those Xcode builds itself; add the dSYMs that come with prebuilt binary frameworks.
The full request and response reference is in Symbols files REST API.