Skip to content

Commit e0cf424

Browse files
committed
Add Instabug for crash reporting
1 parent 6717f27 commit e0cf424

File tree

135 files changed

+4907
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+4907
-0
lines changed
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
/*
2+
File: Instabug/IBGBugReporting.h
3+
4+
Contains: API for using Instabug's SDK.
5+
6+
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
7+
8+
Version: 9.1.3
9+
*/
10+
11+
#import <Foundation/Foundation.h>
12+
#import "IBGTypes.h"
13+
14+
NS_SWIFT_NAME(BugReporting)
15+
@interface IBGBugReporting : NSObject
16+
17+
/**
18+
@brief Acts as master switch for the Bug Reporting.
19+
20+
@discussion It's enabled by default. When disabled, both "Report a bug" and "Suggest an improvement" will be removed from Instabug Prompt Options. In addition, when disabled +showWithReportType:options: won’t have an effect.
21+
*/
22+
@property (class, atomic, assign) BOOL enabled;
23+
24+
/**
25+
@brief Sets a block of code to be executed just before the SDK's UI is presented.
26+
27+
@discussion This block is executed on the UI thread. Could be used for performing any UI changes before the SDK's UI
28+
is shown.
29+
*/
30+
@property(class, atomic, strong) void(^willInvokeHandler)(void);
31+
32+
/**
33+
@brief Sets a block of code to be executed right after the SDK's UI is dismissed.
34+
35+
@discussion This block is executed on the UI thread. Could be used for performing any UI changes after the SDK's UI
36+
is dismissed.
37+
38+
The block has the following parameters:
39+
40+
- dismissType: How the SDK was dismissed.
41+
- reportType: Type of report that has been sent. Will be set to IBGReportTypeBug in case the SDK has been dismissed
42+
without selecting a report type, so you might need to check dismissType before reportType.
43+
44+
@see IBGReportType, IBGDismissType
45+
*/
46+
@property(class, atomic, strong) void(^didDismissHandler)(IBGDismissType dismissType, IBGReportType reportType);
47+
48+
/**
49+
@brief Sets a block of code to be executed when a prompt option is selected
50+
51+
@param didSelectPromptOptionHandler A block of code that gets executed when a prompt option is selected.
52+
53+
The block has the following parameters:
54+
- prompOption: The option selected in prompt.
55+
*/
56+
@property(class, atomic, strong) void(^didSelectPromptOptionHandler)(IBGPromptOption promptOption);
57+
58+
/**
59+
@brief Sets the events that invoke the feedback form.
60+
61+
@discussion Default is set by `startWithToken:invocationEvent:`.
62+
63+
@see IBGInvocationEvent
64+
*/
65+
@property(class, atomic, assign) IBGInvocationEvent invocationEvents;
66+
67+
/**
68+
@brief Sets the threshold value of the shake gesture for iPhone/iPod Touch.
69+
70+
@discussion Default for iPhone is 2.5. The lower the threshold, the easier it will be to invoke Instabug with the
71+
shake gesture. A threshold which is too low will cause Instabug to be invoked unintentionally.
72+
*/
73+
@property(class, atomic, assign) CGFloat shakingThresholdForiPhone;
74+
75+
/**
76+
@brief Sets the threshold value of the shake gesture for iPad.
77+
78+
@discussion Default for iPad is 0.6. The lower the threshold, the easier it will be to invoke Instabug with the
79+
shake gesture. A threshold which is too low will cause Instabug to be invoked unintentionally.
80+
*/
81+
@property(class, atomic, assign) CGFloat shakingThresholdForiPad;
82+
83+
/**
84+
@brief Sets the default edge at which the floating button will be shown. Different orientations are already handled.
85+
86+
@discussion Default for `floatingButtonEdge` is `CGRectMaxXEdge`.
87+
*/
88+
@property(class, atomic, assign) CGRectEdge floatingButtonEdge;
89+
90+
/**
91+
@brief Sets the default offset from the top at which the floating button will be shown.
92+
93+
@discussion Default for `floatingButtonOffsetFromTop` is 50
94+
*/
95+
@property(class, atomic, assign) CGFloat floatingButtonTopOffset;
96+
97+
/**
98+
@brief Sets whether attachments in bug reporting and in-app messaging are enabled.
99+
*/
100+
@property(class, atomic, assign) IBGAttachmentType enabledAttachmentTypes;
101+
102+
/**
103+
@brief Controls if Instabug Prompt Options should contain "Report a problem” and/or "Suggest an improvement" or not.
104+
105+
@discussion By default, both options are enabled.
106+
*/
107+
@property(class, atomic, assign) IBGBugReportingReportType promptOptionsEnabledReportTypes;
108+
109+
/**
110+
@brief Sets whether the extended bug report mode should be disabled, enabled with required fields or enabled with optional fields.
111+
112+
@discussion This feature is disabled by default. When enabled, it adds more fields for your reporters to fill in. You can set whether the extra fields are required or optional.
113+
1. Expected Results.
114+
2. Actual Results.
115+
3. Steps to Reproduce.
116+
117+
An enum to disable the extended bug report mode, enable it with required or with optional fields.
118+
*/
119+
@property(class, atomic, assign) IBGExtendedBugReportMode extendedBugReportMode;
120+
121+
/**
122+
@brief Use to specify different options that would affect how Instabug is shown and other aspects about the reporting experience.
123+
124+
@discussion See IBGInvocationOptions.
125+
*/
126+
@property(class, atomic, assign) IBGBugReportingOption bugReportingOptions;
127+
128+
/**
129+
@brief Sets the default position at which the Instabug screen recording button will be shown. Different orientations are already handled.
130+
131+
@discussion Default for `position` is `bottomRight`.
132+
*/
133+
@property(class, atomic, assign) IBGPosition videoRecordingFloatingButtonPosition;
134+
135+
/**
136+
@method +showWithReportType:options:
137+
@brief Shows the compose view of a bug report or a feedback.
138+
139+
@see IBGBugReportingReportType
140+
@see IBGBugReportingOption
141+
*/
142+
+ (void)showWithReportType:(IBGBugReportingReportType)reportType
143+
options:(IBGBugReportingOption)options;
144+
145+
/**
146+
@brief Dismisses any Instabug views that are currently being shown.
147+
*/
148+
+ (void)dismiss;
149+
150+
/**
151+
@brief Enables/disables inspect view hierarchy when reporting a bug/feedback.
152+
*/
153+
@property (class, atomic, assign) BOOL shouldCaptureViewHierarchy;
154+
155+
/**
156+
@brief Sets whether the SDK is recording the screen or not.
157+
158+
@discussion Enabling auto screen recording would give you an insight on the scenario a user has performed before encountering a bug. screen recording is attached with each bug being sent.
159+
160+
Auto screen recording is disabled by default.
161+
*/
162+
@property (class, atomic, assign) BOOL autoScreenRecordingEnabled;
163+
164+
/**
165+
@brief Sets maximum auto screen recording video duration.
166+
167+
@discussion sets maximum auto screen recording video duration with max value 30 seconds and min value greater than 1 sec.
168+
*/
169+
@property (class, atomic, assign) CGFloat autoScreenRecordingDuration;
170+
171+
/*
172+
+------------------------------------------------------------------------+
173+
| Deprecated APIs |
174+
+------------------------------------------------------------------------+
175+
| The following section includes all deprecated APIs. |
176+
| |
177+
| We've made a few changes to our APIs starting from version 8.0 to make |
178+
| them more intuitive and easily reachable. |
179+
| |
180+
| While the APIs below still function, they will be completely removed |
181+
| in a future release. |
182+
| |
183+
| To adopt the new changes, please refer to our migration guide at: |
184+
| https://docs.instabug.com/docs/ios-sdk-8-1-migration-guide |
185+
+------------------------------------------------------------------------+
186+
*/
187+
188+
@end
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
File: Instabug/IBGChats.h
3+
4+
Contains: API for using Instabug's SDK.
5+
6+
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
7+
8+
Version: 9.1.3
9+
*/
10+
11+
#import <Foundation/Foundation.h>
12+
13+
14+
/*
15+
+--------------------------------------------------------------------------+
16+
| Deprecated APIs |
17+
+--------------------------------------------------------------------------+
18+
| In this release, we’re improving the in-app communication experience. |
19+
| Now, your end user will have a unified experience while sending you |
20+
| a report independently from its type. Whether it is a bug, improvement, |
21+
| or question, they’ll see the same experience. |
22+
| |
23+
| The Chats class and its methods have been deprecated, and while they |
24+
| still function, they will be completely removed in a future release. |
25+
| For more details about this API’s replacement, check the |
26+
| docs here: |
27+
| https://docs.instabug.com/v8.6/docs/ios-sdk-8-6-migration-guide. |
28+
| |
29+
| If you have any questions please reach out to us through |
30+
31+
+--------------------------------------------------------------------------+
32+
*/
33+
34+
NS_SWIFT_NAME(Chats)
35+
@interface IBGChats : NSObject
36+
37+
/**
38+
@brief Acts as master switch for the In-app Chats.
39+
40+
@discussion It's enabled by default. When disabled, the user can't start a new chat from the SDK, the “Ask a question” option is removed from Instabug Prompt Options, and the compose button is removed from the chats list. In addition, when disabled +showWithChatsList: won’t have an effect.
41+
*/
42+
@property (class, atomic, assign) BOOL enabled DEPRECATED_MSG_ATTRIBUTE("See https://docs.instabug.com/docs/ios-sdk-8-6-migration-guide#section-enabled for instructions on migrating to SDK v8.6 APIs.");
43+
44+
/**
45+
@method +show:
46+
@brief Shows the compose new chat view.
47+
48+
@discussion In order to show the chats list, [IBGReplies show] should be used.
49+
*/
50+
+ (void)show DEPRECATED_MSG_ATTRIBUTE("See https://docs.instabug.com/docs/ios-sdk-8-6-migration-guide#section-show for instructions on migrating to SDK v8.6 APIs.");
51+
52+
@end
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
File: Instabug/IBGCrashReporting.h
3+
4+
Contains: API for using Instabug's SDK.
5+
6+
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
7+
8+
Version: 9.1.3
9+
*/
10+
11+
#import <Foundation/Foundation.h>
12+
13+
NS_SWIFT_NAME(CrashReporting)
14+
@interface IBGCrashReporting : NSObject
15+
16+
@property (class, atomic, assign) BOOL enabled;
17+
18+
/**
19+
@brief Report an exception manually.
20+
21+
@param exception Exception to be reported.
22+
*/
23+
+ (void)reportException:(NSException *)exception;
24+
25+
/**
26+
@brief Report an error manually.
27+
28+
@param error error to be reported.
29+
*/
30+
+ (void)reportError:(NSError *)error;
31+
32+
@end
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
File: Instabug/IBGFeatureRequests.h
3+
4+
Contains: API for using Instabug's SDK.
5+
6+
Copyright: (c) 2013-2019 by Instabug, Inc., all rights reserved.
7+
8+
Version: 9.1.3
9+
*/
10+
11+
12+
#import <Foundation/Foundation.h>
13+
#import "IBGTypes.h"
14+
15+
NS_SWIFT_NAME(FeatureRequests)
16+
@interface IBGFeatureRequests : NSObject
17+
18+
/**
19+
@brief Acts as a master switch for the Feature Requests.
20+
21+
@discussion It's enabled by default. When disabled, all the functionalities related to the Feature Requests is disabled.
22+
*/
23+
@property (class, atomic, assign) BOOL enabled;
24+
25+
/**
26+
@brief Sets whether users are required to enter an email address or not when doing a certain action `IBGAction`.
27+
28+
@discussion Defaults to YES.
29+
30+
@param isEmailFieldRequired A boolean to indicate whether email field is required or not.
31+
@param actionType An enum that indicates which action types will have the isEmailFieldRequired.
32+
*/
33+
+ (void)setEmailFieldRequired:(BOOL)isEmailFieldRequired forAction:(IBGAction)actionType;
34+
35+
/**
36+
@brief Shows the UI for feature requests list
37+
*/
38+
+ (void)show;
39+
40+
@end

0 commit comments

Comments
 (0)