Skip to content

Commit 5f6629d

Browse files
authored
:hand_shake: Merge pull request #14 from Instabug/fix/8.0.2
🐛 fix bug where invokeWithModeAndInvocationOptions was not defined in…
2 parents e867633 + 635cf3c commit 5f6629d

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

ios/RNInstabug/InstabugReactBridge.m

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

58-
RCT_EXPORT_METHOD(invokeWithInvocationMode:(IBGInvocationMode)invocationMode options:(IBGBugReportingInvocationOption)options) {
59-
[IBGBugReporting invokeWithMode:invocationMode options:options];
58+
RCT_EXPORT_METHOD(invokeWithInvocationMode:(IBGInvocationMode)invocationMode) {
59+
[Instabug invokeWithInvocationMode:invocationMode];
60+
}
61+
62+
RCT_EXPORT_METHOD(invokeWithInvocationModeAndOptions:(IBGInvocationMode)invocationMode options:(NSArray*)options) {
63+
IBGBugReportingInvocationOption invocationOptions = 0;
64+
for (NSNumber *boxedValue in options) {
65+
invocationOptions |= [boxedValue intValue];
66+
}
67+
[IBGBugReporting invokeWithMode:invocationMode options:invocationOptions];
6068
}
6169

6270
RCT_EXPORT_METHOD(dismiss) {
@@ -625,10 +633,10 @@ - (NSDictionary *)constantsToExport
625633
@"localeTurkish": @(IBGLocaleTurkish),
626634

627635

628-
@"invocationOptionsEmailFieldHidden": @(IBGBugReportingInvocationOptionEmailFieldHidden),
629-
@"invocationOptionsEmailFieldOptional": @(IBGBugReportingInvocationOptionEmailFieldOptional),
630-
@"invocationOptionsCommentFieldRequired": @(IBGBugReportingInvocationOptionCommentFieldRequired),
631-
@"invocationOptionsDisablePostSendingDialog": @(IBGBugReportingInvocationOptionDisablePostSendingDialog),
636+
@"emailFieldHidden": @(IBGBugReportingInvocationOptionEmailFieldHidden),
637+
@"emailFieldOptional": @(IBGBugReportingInvocationOptionEmailFieldOptional),
638+
@"commentFieldRequired": @(IBGBugReportingInvocationOptionCommentFieldRequired),
639+
@"disablePostSendingDialog": @(IBGBugReportingInvocationOptionDisablePostSendingDialog),
632640

633641
@"colorThemeLight": @(IBGColorThemeLight),
634642
@"colorThemeDark": @(IBGColorThemeDark),

0 commit comments

Comments
 (0)