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

Invoking Instabug

This section covers how to set the user action that invokes Instabug, as well as how to customize what appears to your app users after the SDK is invoked for iOS apps.

By default, Instabug is invoked when the device is shaken. This can be changed to several other events that can invoke the SDK. You can also invoke the SDK manually from a custom gesture or a button you add to your app.

Invocation Events

You can set the SDK to be invoked when your users do one or more of the following actions:

  • Shake device
  • Take a screenshot (using home + lock buttons)
  • Tap on a floating button shown above your app's UI
  • Pan to the left from the right edge of the screen (one-finger swipe left)
  • Swipe with two fingers from right to left
  • None (manual invocation)
How to show Instabug

How to show Instabug

You have the option to set one or multiple invocation events. To customize the invocation events, pass the values of the IBGInvocationEvent enum when starting the SDK.

Instabug.start(withToken: "YOUR-TOKEN-HERE", invocationEvents: [.shake, .screenshot])
[Instabug startWithToken:@"YOUR-TOKEN-HERE" invocationEvents: IBGInvocationEventShake | IBGInvocationEventScreenshot]

The possible invocation events are below.


Floating Button

If you are using the floating button, you can set its default position as explained here.


Use the "none" event if you want to invoke the SDK manually in order to prevent the SDK from being invoked through the other events.

Shaking Threshold

If you are using the shaking gesture as your invocation event, you can set how sensitive the device should be to the shaking. The thresholds in the example below are the default values. The higher the value, the less sensitive the device will be to shaking.

IBGBugReporting.shakingThresholdForiPhone = 3.0;
IBGBugReporting.shakingThresholdForiPad = 1.0;
IBGBugReporting.shakingThresholdForiPhone = 3.0;
IBGBugReporting.shakingThresholdForiPad = 1.0;

Changing the Invocation Event

If you want to change the invocation event to any of the other supported events, you can do so at runtime‚Äč as shown below.

BugReporting.invocationEvents = [.shake, .screenshot]
[IBGBugReporting setInvocationEvents:IBGInvocationEventShake | IBGInvocationEventScreenshot];

Manual Invocation

If you want to invoke the SDK manually, use the invoke method.

[IBGBugReporting invoke];

Changing the Invocation Mode

By default, when the Instabug SDK is invoked, a popup appears to your app users that asks "How can we help you?" with options for them to report a bug ("Report a problem"), share feedback ("Suggest an improvement"), or send you a message ("Talk to us") if In-App Chat is supported in your plan.

The Prompt Options menu appears when Instabug is invoked in your app.

The Prompt Options menu appears when Instabug is invoked in your app.

Instead of showing this Prompt Options menu that lets your users choose what they want to do, you can skip this step and take users directly to the bug or feedback reporting flow or chat pages.

For bug and feedback reporting, you can also specify invocation options as described here.

BugReporting.invoke(with: .newBug, options: [])

// You can also specify invocation options
BugReporting.invoke(with: .newBug, options: .emailFieldHidden)
BugReporting.invoke(with: .newBug, options: [.emailFieldHidden, .commentFieldRequired])
[IBGBugReporting invokeWithMode:IBGInvocationModeNewBug options:0];
// You can also specify invocation options
[IBGBugReporting invokeWithMode:IBGInvocationModeNewBug options:IBGBugReportingInvocationOptionEmailFieldHidden];
[IBGBugReporting invokeWithMode:IBGInvocationModeNewBug options:IBGBugReportingInvocationOptionEmailFieldHidden | IBGBugReportingInvocationOptionCommentFieldRequired];

Here are the possible invocation modes.

.newBug //Show a new bug form
.newFeedback // Show a new feedback form
.newChat // Show a new Chat page
.chatsList // Show the list of Chats
  IBGInvocationModeNewBug //Show a new bug form
  IBGInvocationModeNewFeedback // Show a new feedback form
  IBGInvocationModeNewChat // Show a new Chat page
  IBGInvocationModeChatsList // Show the list of Chats

What's Next

Learn how to customize the welcome message to your users or maybe even report your first bug.

Welcome Message
Bug Reporting