Skip to content

Commit 2436691

Browse files
committed
🐛 fix bug where invokeWithModeAndInvocationOptions was not defined in the iOS module
1 parent e867633 commit 2436691

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ - (dispatch_queue_t)methodQueue {
5959
[IBGBugReporting invokeWithMode:invocationMode options:options];
6060
}
6161

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];
68+
}
69+
6270
RCT_EXPORT_METHOD(dismiss) {
6371
[IBGBugReporting dismiss];
6472
}
@@ -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)