Skip to main content

Uploading Symbol Files

The Embrace SDK allows you to view both native and JavaScript stack traces for crashes and error logs. These stack traces, however, usually require symbol files to be able to make sense of them. For JavaScript, you'll need to upload source maps. For iOS, dSYM files, and the mapping file for Android.

Uploading Source Maps

In Xcode, find the "Bundle React Native code and images" step in the Build Phases tab. The contents should look something like the following:

export NODE_BINARY=node

Change the contents to the following:

export NODE_BINARY=node

If you used the setup script mentioned on the Adding the Embrace SDK page, this change has already been made for you.

Symbolication with CodePush

If you use App Center CodePush or any other service to deploy OTA (over the air) updates, you'll need to upload those source maps to Embrace using the upload script that ships with the iOS SDK.

For CodePush, you'll need to generate the bundle and source map to be uploaded.

appcenter codepush release-react -a MyApp --output-dir ./build --sourcemap-output ./map

Then, use the Embrace upload script to upload the source map.

ios/Pods/EmbraceIO/upload --app <your app ID> --token <your token> --rn-bundle ./build/CodePush/main.jsbundle --rn-map ./map

Uploading Native Symbol Files

Please see the Uploading dSYMs page from the iOS integration guide to setup automatic uploading of dSYM files in Xcode.

Pointing the Embrace SDK to the JavaScript Bundle

If you distribute changes to the JavaScript code without submitting a new version to the App Store or Google Play Store (i.e. Expo OTA updates), you must point the Embrace SDK to where the updated JavaScript bundle will be downloaded on the device. You can do this in either the JavaScript part or native parts of your app with the code snippet provided below. Note that this step is unnecessary if you use CodePush since the Embrace SDK will leverage the CodePush SDK to find the location of the bundle.

import {setJavaScriptBundlePath} from 'react-native-embrace';


Expo Apps

If your app is built using Expo and you leverage OTA to distribute updates to your users, you must manually upload source maps using the script distributed with the SDK as described in the Symbolication with CodePush section.

You must also point the Embrace SDK to the location the updated bundle will be downloaded to on the device, as described in the Pointing the Embrace SDK to the JavaScript Bundle.

Now that you know how to upload symbol files to make sure stack traces are translated on the Dashboard, let's generate your first session.