Bugfender for React Native
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


React Native plugin for Bugfender

Getting started

The Bugfender bindings for React Native depend on iOS and Android Bugfender SDKs. Therefore, at this moment it is only possible to integrate Bugfender in a React Native project which already includes native code.

Creating a RN new project compatible with Bugfender

You can create a new project using

$ react-native init AwesomeProject

or if you already started your project using the tool create-react-native-app you will need to eject your project in order to add native modules.

More info can be found in the official docs

Before moving to the next point compile your project and ensure you can execute the project as expected. In this way we can discard future bugs from the Bugfender SDK.

Adding Bugfender to your project

$ cd path_to_your_project

Add bugfender plugin from npm

$ npm install @bugfender/rn-bugfender --save

Link the library to your project

$ react-native link @bugfender/rn-bugfender

This will add the classes of the plugin to your android and iOS projects.


You are done!


Download the latest release from Github and copy BugfenderSDK.framework to YourAwesomeProjectDirectory/ios (same directory as AwesomeProject.xcodeproj). Then, follow the instructions to setup your project manually:

  1. Go to your Project > Your Target > General > Linked Frameworks and Libraries and drag BugfenderSDK.framework there (uncheck the "Copy items if needed" checkbox).
  2. Make sure you have SystemConfiguration.framework, Security.framework, MobileCoreServices.framework and libc++.tbd there as well.
  3. (If using Swift) Import Bugfender.swift helper file to your project. Add an import BugfenderSDK statement at the top.

CocoaPods: unfortunately, RN-Bugfender is not compatible with Cocoapods at this time, the project has to be setup manually.


import Bugfender from '@bugfender/rn-bugfender';

// Init Bugfender with your APP key 

// Sending logs with default level 
Bugfender.d ("REACT", "This is a debug log in Bugfender from React Native");

// Sending logs with warning level 
Bugfender.w ("REACT", "This is a debug log in Bugfender from React Native");

// Sending logs with error level 
Bugfender.e ("REACT", "This is a debug log in Bugfender from React Native");

// Low level logs 
Bugfender.log (1001, "method", "file", "Debug", "tag", "Sending low level log.");
Bugfender.log (1001, "method", "file", "Error", "tag", "Sending low level log.");
Bugfender.log (1001, "method", "file", "Warning", "tag", "Sending low level log.");
// Creating issues 
Bugfender.sendIssue ("New issue", "This will create a new issue in Bugfender");

// Send user feedback 
Bugfender.sendUserFeedback ("New feedback", "This will create a new feedback in Bugfender");

// Set values 
Bugfender.setDeviceString ("device.key.string", "fake.string.value");
Bugfender.setDeviceBoolean ("device.key.boolean", true);
Bugfender.setDeviceFloat ("device.key.float", 101);
Bugfender.setDeviceInteger ("device.key.integer", 102);