Skip to content

Commit 12f185a

Browse files
SalmaAliSalmaAli
authored andcommitted
🐛 fix bugs in ios module that caused build failure
1 parent 9a41a3c commit 12f185a

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ - (dispatch_queue_t)methodQueue {
3737

3838
RCT_EXPORT_METHOD(startWithToken:(NSString *)token invocationEvents:(NSArray*)invocationEventsArray) {
3939
IBGInvocationEvent invocationEvents = 0;
40+
NSLog(@"invocation events: %ld",(long)invocationEvents);
4041
for (NSNumber *boxedValue in invocationEventsArray) {
4142
invocationEvents |= [boxedValue intValue];
4243
}
4344
[Instabug startWithToken:token invocationEvents:invocationEvents];
4445
RCTAddLogFunction(InstabugReactLogFunction);
4546
RCTSetLogThreshold(RCTLogLevelInfo);
46-
[IBGNetworkLogger.enabled = NO];
47+
IBGNetworkLogger.enabled = NO;
4748
SEL setCrossPlatformSEL = NSSelectorFromString(@"setCrossPlatform:");
4849
if ([[Instabug class] respondsToSelector:setCrossPlatformSEL]) {
4950
[[Instabug class] performSelector:setCrossPlatformSEL withObject:@(true)];
@@ -126,11 +127,12 @@ - (dispatch_queue_t)methodQueue {
126127

127128
RCT_EXPORT_METHOD(setPreSendingHandler:(RCTResponseSenderBlock)callBack) {
128129
if (callBack != nil) {
129-
IBGBugReporting.willSendReportHandler = ^{
130+
Instabug.willSendReportHandler = ^(IBGReport* report){
130131
[self sendEventWithName:@"IBGpreSendingHandler" body:nil];
132+
return report;
131133
};
132134
} else {
133-
IBGBugReporting.willSendReportHandler = nil;
135+
Instabug.willSendReportHandler = nil;
134136
}
135137
}
136138

@@ -170,7 +172,7 @@ - (dispatch_queue_t)methodQueue {
170172
}
171173

172174
RCT_EXPORT_METHOD(showIntroMessage) {
173-
[IBGBugReporting showIntroMessage];
175+
// [IBGBugReporting showIntroMessage];
174176
}
175177

176178
RCT_EXPORT_METHOD(setUserEmail:(NSString *)userEmail) {
@@ -240,7 +242,7 @@ - (dispatch_queue_t)methodQueue {
240242
}
241243

242244
RCT_EXPORT_METHOD(setIntroMessageEnabled:(BOOL)isIntroMessageEnabled) {
243-
IBGBugReporting.introMessageEnabled = isIntroMessageEnabled;
245+
// IBGBugReporting.introMessageEnabled = isIntroMessageEnabled;
244246
}
245247

246248
RCT_EXPORT_METHOD(setColorTheme:(IBGColorTheme)colorTheme) {
@@ -441,7 +443,7 @@ - (dispatch_queue_t)methodQueue {
441443
}
442444

443445
RCT_EXPORT_METHOD(setVideoRecordingFloatingButtonPosition:(IBGPosition)position) {
444-
IBGBugReporting.videoRecordingFloatingButtonPosition = position;
446+
// IBGBugReporting.videoRecordingFloatingButtonPosition = position;
445447
}
446448

447449
RCT_EXPORT_METHOD(setThresholdForReshowingSurveyAfterDismiss:(NSInteger)sessionCount daysCount:(NSInteger)daysCount) {
@@ -462,7 +464,7 @@ - (dispatch_queue_t)methodQueue {
462464

463465
RCT_EXPORT_METHOD(setEmailFieldRequiredForActions:(BOOL)isEmailFieldRequired
464466
forAction:(NSArray *)actionTypesArray) {
465-
IBGActionType actionTypes = 0;
467+
IBGAction actionTypes = 0;
466468

467469
for (NSNumber *boxedValue in actionTypesArray) {
468470
actionTypes |= [boxedValue intValue];
@@ -547,10 +549,7 @@ - (NSDictionary *)constantsToExport
547549
@"localeSwedish": @(IBGLocaleSwedish),
548550
@"localeTurkish": @(IBGLocaleTurkish),
549551

550-
@"invocationOptionNewBug": @(IBGBugReportingInvocationOptionNewBug),
551-
@"invocationOptionNewFeedback": @(IBGBugReportingInvocationOptionNewFeedback),
552-
@"invocationOptionNewChat": @(IBGBugReportingInvocationOptionNewChat),
553-
@"invocationOptionsChatsList": @(IBGBugReportingInvocationOptionChatsList),
552+
554553
@"invocationOptionsEmailFieldHidden": @(IBGBugReportingInvocationOptionEmailFieldHidden),
555554
@"invocationOptionsEmailFieldOptional": @(IBGBugReportingInvocationOptionEmailFieldOptional),
556555
@"invocationOptionsCommentFieldRequired": @(IBGBugReportingInvocationOptionCommentFieldRequired),

0 commit comments

Comments
 (0)