HomeDocumentationAPI Reference
Getting StartedAPI ReferenceDashboardHelp Center
API Reference

Set Attachment Types

You can set the types of attachments your users can add to reports using this API.

The available attachment types are:

  • Initial Screenshot
  • Extra Screenshot
  • Gallery Image
  • Screen Recording

Method

iOS-Swift

BugReporting.enabledAttachmentTypes = [.screenShot, .screenRecording]

iOS-ObjC

IBGBugReporting.enabledAttachmentTypes = IBGAttachmentTypeScreenShot | IBGAttachmentTypeScreenRecording;

Android

// Arguments:initialScreenshot, extraScreenshot, galleryImage & ScreenRecording
BugReporting.setAttachmentTypesEnabled(true, true, true, true);

R.N.

Instabug.setEnabledAttachmentTypes(screenshot, extraScreenshot, galleryImage, screenRecording);

//All properties are boolean values

Cordova

cordova.plugins.bugReporting.setEnabledAttachmentTypes(screenshot,
  extraScreenshot,
  galleryImage,
  screenRecording,
  success,
  error);

//All properties are boolean values

Xamarin

//iOS

IBGBugReporting.EnabledAttachmentTypes = IBGAttachmentType.Screenshot | IBGAttachmentType.ScreenRecording;

//Android 
//Boolean parameters: initialScreenshot,  extraScreenshot,  galleryImage,  ScreenRecording
new Instabug.Builder(this, "ANDROID_APP_TOKEN")
  	.SetInvocationEvent(InstabugInvocationEvent.Shake)
  	.SetAttachmentTypesEnabled(true, true, true, false)
  	.Build();

Flutter

//Boolean arguments
BugReporting.setEnabledAttachmentTypes(screenshot, extraScreenshot, galleryImage, screenRecording);

Attachment Types Enums

iOS-Swift

//Inital Screenshot
.screenShot
//Extra Screenshot
.extraScreenShot
//Gallery Image
.galleryImage
//Screen Recording
.screenRecording

iOS-ObjC

//Inital Screenshot
IBGAttachmentTypeScreenshot;
//Extra Screenshot
IBGAttachmentTypeExtraScreenshot;
//Gallery Image
IBGAttachmentTypeGalleryImage;
//Screen Recording
IBGAttachmentTypeScreenRecording;

Xamarin

//iOS Only
IBGAttachmentType.ScreenRecording
IBGAttachmentType.Screenshot
IBGAttachmentType.ExtraScreenshot
IBGAttachmentType.GalleryImage