codeBundleId (like a version for Code Push), and send us the source maps associated with that
codeBundleId. Bugsnag will link the errors you send, with the associated source maps, so it’s easy to see what line of code caused the error.
Before you deploy, the
codeBundleId gets defined in your Bugsnag configuration.
const config = new Configuration('YOUR_API_KEY_HERE'); config.codeBundleId = '1.0-123' const bugsnag = new Client(config);
When you release your app, specify the
--outputDir in order to capture the source map and asset bundle files for upload.
code-push release-react <appName> <platform> --outputDir <outputDir> <other options>
And finally, send Bugsnag your source maps, making sure to include the
codeBundleId and source map path.
$ curl https://upload.bugsnag.com/ \ -F apiKey=YOUR_API_KEY_HERE \ -F codeBundleId=1.0-123 \ -F minifiedUrl="main.jsbundle" \ -F sourceMap=@path/to/main.jsbundle.map \ -F minifiedFile=@path/to/main.jsbundle \ -F overwrite=true -F */index.ios.js=@/workspace/app/index.ios.js
For a full rundown of each of these steps, make sure to check out the Bugsnag docs. We hope this new support is useful as more and more of you continue to roll out React Native apps.