-
Notifications
You must be signed in to change notification settings - Fork 100
Documentation
Instabug
-
Instabug
-
static
-
.invocationEvent :
enum
-
.dismissType :
enum
-
.reportType :
enum
-
.invocationMode :
enum
-
.locale :
enum
-
.colorTheme :
enum
-
.rectEdge :
enum
-
.strings :
enum
- .startWithToken(token, invocationEvent)
- .invoke()
- .invokeWithInvocationMode(invocationMode)
- .dismiss()
- .setFileAttachment(fileLocation)
- .setUserData(userData)
- .IBGLog(log)
- .setUserStepsEnabled(isUserStepsEnabled)
- .setPreSendingHandler(preSendingHandler)
- .setPreInvocationHandler(preInvocationHandler)
- .setPostInvocationHandler(postInvocationHandler)
- .showIntroMessage()
- .setUserEmail(userEmail)
- .setUserName(userName)
- .setWillSkipScreenshotAnnotation(willSkipScreenshotAnnotation)
- .getUnreadMessagesCount(messageCountCallback)
- .setInvocationEvent(invocationEvent)
- .setPushNotificationsEnabled(isPushNotificationEnabled)
- .setEmailFieldRequired(isEmailFieldRequired)
- .setCommentFieldRequired(isCommentFieldRequired)
- .setShakingThresholdForIPhone(iPhoneShakingThreshold, iPadShakingThreshold)
- .setFloatingButtonEdge(floatingButtonEdge, offsetFromTop)
- .setLocale(locale)
- .setIntroMessageEnabled(isIntroMessageEnabled)
- .setColorTheme(colorTheme)
- .setPrimaryColor(primaryColor)
- .appendTags(tags)
- .resetTags()
- .getTags(tagsCallback)
- .setStringToKey(string, key)
- .setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording)
- .setChatNotificationEnabled(isChatNotificationEnabled)
- .setOnNewMessageHandler(onNewMessageHandler)
- .setPromptOptions(isBugReportingEnabled, isFeedbackReportingEnabled, isChatEnabled)
- .isInstabugNotification(dict, isInstabugNotificationCallback)
-
.invocationEvent :
-
inner
-
~preSendingHandler :
function
-
~preSendingHandler :
function
-
~postInvocationHandler :
function
-
~messageCountCallback :
function
-
~tagsCallback :
function
-
~onNewMessgaeHandler :
function
-
~isInstabugNotificationCallback :
function
-
~preSendingHandler :
-
static
The event used to invoke the feedback form
Kind: static enum of Instabug
Read only: true
Properties
Name | Type | Default |
---|---|---|
none | number |
Instabug.invocationEventNone |
shake | number |
Instabug.invocationEventShake |
screenshot | number |
Instabug.invocationEventScreenshot |
twoFingersSwipe | number |
Instabug.invocationEventTwoFingersSwipe |
floatingButton | number |
Instabug.invocationEventFloatingButton |
Type of SDK dismiss
Kind: static enum of Instabug
Read only: true
Properties
Name | Type | Default |
---|---|---|
submit | number |
Instabug.dismissTypeSubmit |
cancel | number |
Instabug.dismissTypeCancel |
addAttachment | number |
Instabug.dismissTypeAddAttachment |
Type of report to be submit
Kind: static enum of Instabug
Read only: true
Properties
Name | Type | Default |
---|---|---|
bug | number |
Instabug.reportTypeBug |
feedback | number |
Instabug.reportTypeFeedback |
The mode used upon invocating the SDK
Kind: static enum of Instabug
Read only: true
Properties
Name | Type | Default |
---|---|---|
NA | number |
Instabug.invocationModeNA |
newBug | number |
Instabug.invocationModeNewBug |
newFeedback | number |
Instabug.invocationModeNewFeedback |
newChat | number |
Instabug.invocationModeNewChat |
chatsList | number |
Instabug.invocationModeChatsList |
The supported locales
Kind: static enum of Instabug
Read only: true
Properties
Name | Type | Default |
---|---|---|
arabic | number |
Instabug.localeArabic |
chineseSimplified | number |
Instabug.localeChineseSimplified |
chineseTraditional | number |
Instabug.localeChineseTraditional |
czech | number |
Instabug.localeCzech |
danish | number |
Instabug.localeDanish |
english | number |
Instabug.localeEnglish |
french | number |
Instabug.localeFrench |
german | number |
Instabug.localeGerman |
italian | number |
Instabug.localeItalian |
japanese | number |
Instabug.localeJapanese |
polish | number |
Instabug.localePolish |
portugueseBrazil | number |
Instabug.localePortugueseBrazil |
russian | number |
Instabug.localeRussian |
spanish | number |
Instabug.localeSpanish |
swedish | number |
Instabug.localeSwedish |
turkish | number |
Instabug.localeTurkish |
The color theme of the different UI elements
Kind: static enum of Instabug
Read only: true
Properties
Name | Type | Default |
---|---|---|
light | number |
Instabug.colorThemeLight |
dark | number |
Instabug.colorThemeDark |
Rectangle edges
Kind: static enum of Instabug
Read only: true
Properties
Name | Type | Default |
---|---|---|
minX | number |
Instabug.rectMinXEdge |
minY | number |
Instabug.rectMinYEdge |
maxX | number |
Instabug.rectMaxXEdge |
maxY | number |
Instabug.rectMaxYEdge |
Instabug strings
Kind: static enum of Instabug
Read only: true
Properties
Name | Type | Default |
---|---|---|
shakeHint | number |
Instabug.shakeHint |
swipeHint | number |
Instabug.swipeHint |
edgeSwipeStartHint | number |
Instabug.edgeSwipeStartHint |
startAlertText | number |
Instabug.startAlertText |
invalidEmailMessage | number |
Instabug.invalidEmailMessage |
invalidEmailTitle | number |
Instabug.invalidEmailTitle |
invalidCommentMessage | number |
Instabug.invalidCommentMessage |
invalidCommentTitle | number |
Instabug.invalidCommentTitle |
invocationHeader | number |
Instabug.invocationHeader |
talkToUs | number |
Instabug.talkToUs |
reportBug | number |
Instabug.reportBug |
reportFeedback | number |
Instabug.reportFeedback |
emailFieldHint | number |
Instabug.emailFieldHint |
commentFieldHintForBugReport | number |
Instabug.commentFieldHintForBugReport |
commentFieldHintForFeedback | number |
Instabug.commentFieldHintForFeedback |
addVideoMessage | number |
Instabug.addVideoMessage |
addVoiceMessage | number |
Instabug.addVoiceMessage |
addImageFromGallery | number |
Instabug.addImageFromGallery |
addExtraScreenshot | number |
Instabug.addExtraScreenshot |
audioRecordingPermissionDeniedTitle | number |
Instabug.audioRecordingPermissionDeniedTitle |
audioRecordingPermissionDeniedMessage | number |
Instabug.audioRecordingPermissionDeniedMessage |
microphonePermissionAlertSettingsButtonText | number |
Instabug.microphonePermissionAlertSettingsButtonText |
recordingMessageToHoldText | number |
Instabug.recordingMessageToHoldText |
recordingMessageToReleaseText | number |
Instabug.recordingMessageToReleaseText |
conversationsHeaderTitle | number |
Instabug.conversationsHeaderTitle |
screenshotHeaderTitle | number |
Instabug.screenshotHeaderTitle |
chatsNoConversationsHeadlineText | number |
Instabug.chatsNoConversationsHeadlineText |
doneButtonText | number |
Instabug.doneButtonText |
okButtonText | number |
Instabug.okButtonText |
cancelButtonText | number |
Instabug.cancelButtonText |
thankYouText | number |
Instabug.thankYouText |
audio | number |
Instabug.audio |
video | number |
Instabug.video |
image | number |
Instabug.image |
chatsHeaderTitle | number |
Instabug.chatsHeaderTitle |
team | number |
Instabug.team |
messageNotification | number |
Instabug.messageNotification |
messagesNotificationAndOthers | number |
Instabug.messagesNotificationAndOthers |
Starts the SDK. This is the main SDK method that does all the magic. This is the only method that SHOULD be called. Should be called in constructor of the app registery component
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
token | string |
The token that identifies the app, you can find it on your dashboard. |
invocationEvent | invocationEvent |
The event that invokes the SDK's UI. |
Invokes the SDK manually with the default invocation mode. Shows a view that asks the user whether they want to start a chat, report a problem or suggest an improvement.
Kind: static method of Instabug
Invokes the SDK with a specific mode. Invokes the SDK and show a specific view, instead of showing a prompt for users to choose from.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
invocationMode | invocationMode |
Specifies which mode the SDK is going to start with. |
Dismisses any Instabug views that are currently being shown.
Kind: static method of Instabug
Attaches a file to each report being sent. A new copy of the file at fileLocation will be attached with each bug report being sent. Each call to this method overrides the file to be attached. The file has to be available locally at the provided path.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
fileLocation | string |
Path to a file that's going to be attached to each report. |
Attaches user data to each report being sent. Each call to this method overrides the user data to be attached. Maximum size of the string is 1,000 characters.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
userData | string |
A string to be attached to each report, with a maximum size of 1,000 characters. |
Adds custom logs that will be sent with each report.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
log | string |
Message to be logged. |
Sets whether the SDK is tracking user steps or not. Enabling user steps would give you an insight on the scenario a user has performed before encountering a bug or a crash. User steps are attached with each report being sent.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
isUserStepsEnabled | boolean |
A boolean to set user steps tracking to being enabled or disabled. |
Sets a block of code to be executed before sending each report. This block is executed in the background before sending each report. Could be used for attaching logs and extra data to reports.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
preSendingHandler | preSendingHandler |
A callback that gets executed before sending each bug report. |
Sets a block of code to be executed just before the SDK's UI is presented. This block is executed on the UI thread. Could be used for performing any UI changes before the SDK's UI is shown.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
preInvocationHandler | preInvocationHandler |
A callback that gets executed before invoking the SDK |
Sets a block of code to be executed right after the SDK's UI is dismissed. This block is executed on the UI thread. Could be used for performing any UI changes after the SDK's UI is dismissed.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
postInvocationHandler | postInvocationHandler |
A callback to get executed after dismissing the SDK. |
Present a view that educates the user on how to invoke the SDK with the currently set invocation event.
Kind: static method of Instabug
Sets the default value of the user's email and hides the email field from the reporting UI. Defaults to an empty string.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
userEmail | string |
An email address to be set as the user's email. |
Sets the default value of the user's name to be included with all reports. Defaults to an empty string.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
userName | string |
Name of the user to be set. |
Enables/disables screenshot view when reporting a bug/improvement. By default, screenshot view is shown when reporting a bug, but not when sending feedback.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
willSkipScreenshotAnnotation | boolean |
sets whether screenshot view is shown or not. Passing YES will show screenshot view for both feedback and bug reporting, while passing NO will disable it for both. |
Returns the number of unread messages the user currently has. Use this method to get the number of unread messages the user has, then possibly notify them about it with your own UI.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
messageCountCallback | messageCountCallback |
callback with argument Notifications count, or -1 incase the SDK has not been initialized. |
Sets the event that invoke the feedback form.
Default is set by Instabug.startWithToken
.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
invocationEvent | invocationEvent |
Event that invokes the feedback form. |
Enables/disables the use of push notifications in the SDK. Defaults to YES.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
isPushNotificationEnabled | boolean |
A boolean to indicate whether push notifications are enabled or disabled. |
Sets whether users are required to enter an email address or not when sending reports. Defaults to YES.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
isEmailFieldRequired | boolean |
A boolean to indicate whether email field is required or not. |
Sets whether users are required to enter a comment or not when sending reports. Defaults to NO.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
isCommentFieldRequired | boolean |
A boolean to indicate whether comment field is required or not. |
Sets the threshold value of the shake gesture for iPhone/iPod Touch and iPad. Default for iPhone is 2.5. Default for iPad is 0.6.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
iPhoneShakingThreshold | number |
Threshold for iPhone. |
iPadShakingThreshold | number |
Threshold for iPad. |
Sets the default edge and offset from the top at which the floating button
will be shown. Different orientations are already handled.
Default for floatingButtonEdge
is rectEdge.maxX
.
Default for floatingButtonOffsetFromTop
is 50
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
floatingButtonEdge | rectEdge |
maxX to show on the right, or minX to show on the left. |
offsetFromTop | number |
floatingButtonOffsetFromTop Top offset for floating button. |
Sets the SDK's locale. Use to change the SDK's UI to different language. Defaults to the device's current locale.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
locale | locale |
A locale to set the SDK to. |
Sets whether the intro message that gets shown on launching the app is enabled or not. Defaults to YES.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
isIntroMessageEnabled | boolean |
A boolean to indicate whether the intro message is enabled or not. |
Sets the color theme of the SDK's whole UI. the SDK's UI to.
Kind: static method of Instabug
Param |
---|
colorTheme |
Sets the primary color of the SDK's UI. Sets the color of UI elements indicating interactivity or call to action. To use, import processColor and pass to it with argument the color hex as argument.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
primaryColor | color |
A color to set the UI elements of the SDK to. |
Appends a set of tags to previously added tags of reported feedback, bug or crash.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
tags | Array.<string> |
An array of tags to append to current tags. |
Manually removes all tags of reported feedback, bug or crash.
Kind: static method of Instabug
Gets all tags of reported feedback, bug or crash.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
tagsCallback | tagsCallback |
callback with argument tags of reported feedback, bug or crash. |
Overrides any of the strings shown in the SDK with custom ones. Allows you to customize any of the strings shown to users in the SDK.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
string | string |
String value to override the default one. |
key | strings |
Key of string to override. |
Instabug.setAttachmentTypesEnabled(screenshot, extraScreenshot, galleryImage, voiceNote, screenRecording)
Sets whether attachments in bug reporting and in-app messaging are enabled or not.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
screenshot | boolean |
A boolean to enable or disable screenshot attachments. |
extraScreenshot | boolean |
A boolean to enable or disable extra screenshot attachments. |
galleryImage | boolean |
A boolean to enable or disable gallery image attachments. In iOS 10+,NSPhotoLibraryUsageDescription should be set in info.plist to enable gallery image attachments. |
voiceNote | boolean |
A boolean to enable or disable voice note attachments. In iOS 10+, NSMicrophoneUsageDescription should be set in info.plist to enable voiceNote attachments. |
screenRecording | boolean |
A boolean to enable or disable screen recording attachments. |
Enables/disables showing in-app notifications when the user receives a new message.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
isChatNotificationEnabled | boolean |
A boolean to set whether notifications are enabled or disabled. |
Sets a block of code that gets executed when a new message is received.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
onNewMessageHandler | onNewMessgaeHandler |
A callback that gets executed when a new message is received. |
Enables/disables prompt options when SDK is invoked. When only a single option is enabled, it become the default invocation mode. If all options are disabled, bug reporting becomes the default invocation mode. By default, all three options are enabled.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
isBugReportingEnabled | boolean |
A boolean to indicate whether bug reports are enabled or disabled. |
isFeedbackReportingEnabled | boolean |
A boolean to indicate whether feedback is enabled or disabled. |
isChatEnabled | boolean |
A boolean to indicate whether chat is enabled or disabled. |
Checks if a notification is from Instabug. If you are using push notifications, use this method to check whether an incoming notification is from Instabug or not. If this method returns YES, you should call didReceiveRemoteNotification: to let the Instabug handle the notification. Otherwise, handle the notification on your own.
Kind: static method of Instabug
Param | Type | Description |
---|---|---|
dict | Object |
Notification's userInfo |
isInstabugNotificationCallback | isInstabugNotificationCallback |
callback with argument isInstabugNotification |
A callback that gets executed before sending each bug report.
Kind: inner typedef of Instabug
Sets a block of code to be executed just before the SDK's UI is presented. This block is executed on the UI thread. Could be used for performing any UI changes before the SDK's UI is shown.
Kind: inner typedef of Instabug
A callback that gets executed after the SDK's UI is dismissed.
Kind: inner typedef of Instabug
Param | Type | Description |
---|---|---|
dismissType | dismissType |
How the SDK was dismissed. |
reportType | reportType |
Type of report that has been sent. Will be set to IBGReportTypeBug in case the SDK has been dismissed without selecting a report type, so you might need to check issueState before reportType |
return callback
Kind: inner typedef of Instabug
Param{number}: responseCount Notifications count, or -1 incase the SDK has
not been initialized.
return callback
Kind: inner typedef of Instabug
Param | Type | Description |
---|---|---|
tags | Array.<string> |
of reported feedback, bug or crash. |
A callback that gets executed when a new message is received.
Kind: inner typedef of Instabug
return callback
Kind: inner typedef of Instabug
Param | Type |
---|---|
isInstabugNotification | boolean |