This is the documentation for our Corodva SDK. The SDK uses a native extension for iOS and Android but will fall back to a pure JavaScript version (raven-js) if needed.


Start by adding Sentry and then linking it:

$ cordova plugin add @sentry/cordova

Our new Sentry Wizard will help you to configure your project. We also add a build step to your Xcode project to upload debug symbols we need to symbolicate iOS crashes.


This example shows the bare minium for a plain Cordova project. Add this to you index.js:

onDeviceReady: function() {
    var Sentry = cordova.require("cordova-plugin-sentry.SentryCordovaBundle").default;
    var SentryBrowser = cordova.require("cordova-plugin-sentry.SentryCordovaBundle").SentryBrowser;
    var SentryCordova = cordova.require("cordova-plugin-sentry.SentryCordovaBundle").SentryCordova;

        .use(SentryCordova, {sentryBrowser: SentryBrowser})

This will setup the Client for native and JavaScript crashes. If you minify or bundle your code we need your sourcemap files in order to symbolicate JavaScript errors, please see: JavaScript sourcemaps for more details.

iOS Specifics

When you use Xcode you can hook directly into the build process to upload debug symbols. If you however are using bitcode you will need to disable the “Upload Debug Symbols to Sentry” build phase and then separately upload debug symbols from iTunes Connect to Sentry.