Skip to main content

Instrumentation Wizard

Provides a fast and convenient way to instrument our SDK products into your application.

Supported Platforms

Currently supports Android, iOS, and Web applications.

Download

Download the binary executable from the ONE platform that matches your OS/CPU architecture (supported: macOS arm64, macOS x64, win-x64).

wizardDownLoad

How to Run

For different environments, we recommend running from the command line. Open a terminal at the root directory of the project you want to instrument, drag the executable into the terminal, and run it.

iOS

Using the iOS project root (the directory where the .xcodeproj is located) as the working directory, run ${ONE-SDK-wizard} -i ios.

The ONE‑SDK wizard performs the following:

  • Adds BonreeRUM to the Podfile and runs pod repo update and pod install --silent.
  • Adds the SDK initialization code to AppDelegate or to the init method of a SwiftUI app.

Android

Using the Android project root (the directory that contains settings.gradle or build.gradle) as the working directory, run ${ONE-SDK-wizard} -i android.

The ONE‑SDK wizard performs the following:

  • Gradle automation; automatically modifies the following files:
    • settings.gradle(.kts):
      • Injects Bonree's dedicated Maven repository in pluginManagement (for resolving the plugin).
      • Injects repositories in dependencyResolutionManagement (for resolving library dependencies).
    • Root build.gradle(.kts):
      • Automatically adds the buildscript block and the classpath plugin dependency.
    • App module build.gradle(.kts):
      • Applies the plugin: apply plugin: 'bonree'.
      • Adds the dependency: implementation 'com.bonree.agent.android:agent-lib:...'.
  • AndroidManifest.xml and permissions handling.
  • Automatically inserts the initialization code after super.onCreate() in Application.onCreate() or MainActivity.onCreate().
  • Modifies proguard-rules.pro to include the required ProGuard rules.

Web

Using the Web project root as the working directory, run ${ONE-SDK-wizard} -i web.

The ONE‑SDK wizard performs the following:

  • Scans the project and lists all html files so that you can select the files to instrument (multiple selection supported).
  • After selecting the environment and application on the platform, downloads the corresponding version of BonreeSDK_JS.min.js.
  • Checks whether a package.json exists to determine where to store BonreeSDK_JS.min.js (since Web projects are flexible and diverse, a general‑purpose location is used).
  • Inserts a script tag into the selected html files that contains the instrumentation snippet and the reference path to BonreeSDK_JS.min.js.