Bugfender module for React Native and React Native for the Web. It depends on the iOS, Android and Javascript Bugfender SDKs.
This version has been tested in React Native with both the Old and New Architecture. The New Architecture is still experimental, and therefore subject to break in new React Native versions.
Bugfender works with Expo in the "bare workflow". The Expo Go application (used in the managed workflow) can not run the Bugfender SDK because it contains native code.
$ cd path_to_your_project
Add the bugfender plugin from npm
$ npm install @bugfender/rn-bugfender @bugfender/sdk @bugfender/common
After installing, close and relaunch your app with npm run ios or npm run android.
import { Bugfender, LogLevel } from '@bugfender/rn-bugfender';Please check the following URL for a complete API reference: https://docs.bugfender.com.
Note: always import @bugfender/rn-bugfender instead of @bugfender/sdk. This will enable the native features of the SDK that you wouldn't get otherwise.
import { Bugfender, LogLevel } from '@bugfender/rn-bugfender';
// Init Bugfender with your APP key
Bugfender.init({
appKey: '<YOUR APP KEY>',
// apiURL: 'https://api.bugfender.com',
// baseURL: 'https://dashboard.bugfender.com',
// overrideConsoleMethods: true,
// printToConsole: true,
// logUIEvents: true,
// registerErrorHandler: true,
// deviceName: 'Anonymous',
// maximumLocalStorageSize: 5 * 1024 * 1024, // Native specific
// enableLogcatLogging: false, // Android specific
// logBrowserEvents: true, // Web specific
// build: '42', // Web specific
// version: '1.0', // Web sprecific
});The changelog of the Bugfender Web SDK can be found in ReleaseNotes under the react-native tag. For all the Bugfender product changes please visit the general release notes.
We often get questions about CocoaPods install failing. Whilst this has nothing to do with Bugfender, you may encounter this problem while installing the pod.
To reinstall the pods, you can do:
bundle exec pod installOr, for the New Architecture:
RCT_NEW_ARCH_ENABLED=1 bundle exec pod installYou can find more details here: https://reactnative.dev/docs/environment-setup