Welcome to Instabug's Documentation! Here you'll find
a comprehensive technical guide to help you start
working with the Instabug SDK as quickly as possible.

Get Started

Bug Reporting

This page covers some APIs specific for Unity bug reporting.

We're covering bug reporting in this page. However, in the Reports Data section, you can find more information about the data sent with each bug report.

SDK Events

Before Showing the SDK

This block is executed on the UI thread. Could be used for performing any UI changes before the SDK's UI is shown.

[MonoPInvokeCallback(typeof(InstabugIOS.PreInvocationCallbackDelegate))]
	public static void PreInvocationCallback() {
    // Perform any UI changes in this block before the SDK's UI is shown.
		Debug.Log("Pre Invocation Callback!");
	}

InstabugIOS.SetPreInvocationHandler(PreInvocationCallback);
[MonoPInvokeCallback(typeof(InstabugAndroid.PreInvocationCallbackDelegate))]
	public static void PreInvocationCallback() {
    // Perform any UI changes in this block before the SDK's UI is shown.
		Debug.Log("Pre Invocation Callback!");
	}

InstabugAndroid.SetPreInvocationHandler(PreInvocationCallback);

Before Sending a Report

This block is executed in the background before sending each report. Could be used for attaching logs and extra data to reports.

[MonoPInvokeCallback(typeof(InstabugIOS.PreSendingCallbackDelegate))]
	public static void PreSendingCallback() {
    // Attach logs and extra data to reports in this block.
		Debug.Log("Pre Sending Callback!");
	}
InstabugIOS.SetPreSendingHandler(PreSendingCallback);
[MonoPInvokeCallback(typeof(InstabugAndroid.PreSendingCallbackDelegate))]
	public static void PreSendingCallback() {
    // Attach logs and extra data to reports in this block.
		Debug.Log("Pre Sending Callback!");
	}

InstabugAndroid.SetPreSendingHandler(PreSendingCallback);

After the SDK Has Been Dismissed

This block is executed on the UI thread. Could be used for performing any UI changes after the SDK's UI has been dismissed.

[MonoPInvokeCallback(typeof(InstabugIOS.PostInvocationCallbackDelegate))]
public static void PostInvocationCallback(InstabugIOS.IBGDismissType dismissType, InstabugIOS.IBGReportType reportType) {
  // Perform any UI changes in this block after the SDK's UI has been dismissed.
  Debug.Log("Dismiss Type: "+ dismissType + "Report Type: " + reportType);
}

InstabugIOS.SetPostInvocationHandler(PostInvocationCallback);
[MonoPInvokeCallback(typeof(InstabugAndroid.PostInvocationCallbackDelegate))]
public static void PostInvocationCallback(InstabugAndroid.IBGDismissType dismissType, InstabugAndroid.IBGReportType reportType) {
  // Perform any UI changes in this block after the SDK's UI has been dismissed.
  Debug.Log("Dismiss Type: "+ dismissType + "Report Type: " + reportType);
}

InstabugAndroid.SetPostInvocationHandler(PostInvocationCallback);

The postInvocationHandler block has the following parameters:

  • dismissType: How the SDK was dismissed.
  • reportType: Type of report that has been sent. Will be set to bug in case the SDK has been dismissed without selecting a report type, so you might need to check issueState before reportType.