Skip to content

Commit d41645d

Browse files
SalmaAliSalmaAli
authored andcommitted
📝 change remaining methods in ios to match new public apis
1 parent 12f185a commit d41645d

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,8 @@ - (dispatch_queue_t)methodQueue {
5555
[IBGBugReporting invoke];
5656
}
5757

58-
RCT_EXPORT_METHOD(invokeWithInvocationMode:(IBGInvocationMode)invocationMode) {
59-
[Instabug invokeWithInvocationMode:invocationMode];
60-
}
61-
62-
RCT_EXPORT_METHOD(invokeWithInvocationModes:(IBGBugReportingInvocationOption)invocationOptions) {
63-
[Instabug invokeWithOptions:invocationOptions];
58+
RCT_EXPORT_METHOD(invokeWithInvocationMode:(IBGInvocationMode)invocationMode options:(IBGBugReportingInvocationOption)options) {
59+
[IBGBugReporting invokeWithMode:invocationMode options:options];
6460
}
6561

6662
RCT_EXPORT_METHOD(dismiss) {
@@ -216,8 +212,8 @@ - (dispatch_queue_t)methodQueue {
216212
}
217213

218214
RCT_EXPORT_METHOD(setShakingThresholdForIPhone:(double)iPhoneShakingThreshold forIPad:(double)iPadShakingThreshold) {
219-
[Instabug setShakingThresholdForiPhone:iPadShakingThreshold
220-
foriPad:iPadShakingThreshold];
215+
[IBGBugReporting setShakingThresholdForiPhone:iPhoneShakingThreshold];
216+
[IBGBugReporting setShakingThresholdForiPad:iPadShakingThreshold];
221217
}
222218

223219
RCT_EXPORT_METHOD(setShakingThresholdForiPhone:(double)iPhoneShakingThreshold) {

ios/RNInstabug/RCTConvert+InstabugEnums.m

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,11 @@ @implementation RCTConvert (InstabugEnums)
2929
}), IBGInvocationModeNA, integerValue);
3030

3131
RCT_ENUM_CONVERTER(IBGBugReportingInvocationOption, (@{
32-
@"invocationOptionNewBug": @(IBGBugReportingInvocationOptionNewBug),
33-
@"invocationOptionNewFeedback": @(IBGBugReportingInvocationOptionNewFeedback),
34-
@"invocationOptionNewChat": @(IBGBugReportingInvocationOptionNewChat),
35-
@"invocationOptionsChatsList": @(IBGBugReportingInvocationOptionChatsList),
3632
@"invocationOptionsEmailFieldHidden": @(IBGBugReportingInvocationOptionEmailFieldHidden),
3733
@"invocationOptionsEmailFieldOptional": @(IBGBugReportingInvocationOptionEmailFieldOptional),
3834
@"invocationOptionsCommentFieldRequired": @(IBGBugReportingInvocationOptionCommentFieldRequired),
3935
@"invocationOptionsDisablePostSendingDialog": @(IBGBugReportingInvocationOptionDisablePostSendingDialog)
40-
}), IBGBugReportingInvocationOptionNewBug, integerValue);
36+
}), 0, integerValue);
4137

4238
RCT_ENUM_CONVERTER(IBGDismissType, (@{
4339
@"dismissTypeSubmit": @(IBGDismissTypeSubmit),
@@ -110,7 +106,7 @@ @implementation RCTConvert (InstabugEnums)
110106
}), IBGPositionBottomRight, integerValue);
111107

112108

113-
RCT_ENUM_CONVERTER(IBGActionType, (@{
109+
RCT_ENUM_CONVERTER(IBGAction, (@{
114110
@"allActions": @(IBGActionAllActions),
115111
@"reportBug": @(IBGActionReportBug),
116112
@"requestNewFeature": @(IBGActionRequestNewFeature),

0 commit comments

Comments
 (0)