1. Home
  2. Docs
  3. Bugfender on hybrid development frameworks
  4. Ionic 4 (Cordova-based)

Ionic 4 (Cordova-based)

Please note these instructions are for old versions of Ionic (version 4). For versions 5+, check the Capacitor plugin.

Requirements for iOS:

  • Mac computer, Ionic Pro Package does not work.
  • Xcode
  • CocoaPods
  • Ionic 4

Requirements for Android:

  • Android Studio
  • Ionic 4

Installation steps:

If developing for iOS, Bugfender is compatible with iOS 8.0 and better. Edit your config.xml file, look for the iOS platform and add the following preference below (in bold):

<platform name="ios">
    <preference name="deployment-target" value="8.0" />
    ...
</platform>

In your console, type the following command:

ionic cordova plugin add cordova-plugin-bugfender --variable BUGFENDER_APP_KEY=YOUR_APP_KEY --save

If you do not have a Bugfender account yet, Sign up to get your key from the Install SDK wizard.

Import Bugfender module:

import { Bugfender } from 'cordova-plugin-bugfender/www/bugfender';

Replace console.log() with Bugfender.log() for the logs you want to send to Bugfender

Done! Run your application on a real device or emulator to get the first logs in.

Please note: Bugfender does nothing when testing on the ionic serve because it’s not a mobile platform. You will need to run on a real device or emulator to test it, with a command such as ionic cordova emulate ios or ionic cordova emulate android.

For a more advanced configuration please refer to the GitHub repository.