Skip to content

Commit 1309390

Browse files
SalmaAliSalmaAli
authored andcommitted
šŸ“ change preSendingHandler to return the report as a parameter to the callback
1 parent 142368a commit 1309390

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ā€Žios/RNInstabug/InstabugReactBridge.m

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,13 @@ - (dispatch_queue_t)methodQueue {
124124
RCT_EXPORT_METHOD(setPreSendingHandler:(RCTResponseSenderBlock)callBack) {
125125
if (callBack != nil) {
126126
Instabug.willSendReportHandler = ^(IBGReport* report){
127-
[self sendEventWithName:@"IBGpreSendingHandler" body:nil];
127+
NSArray *tagsArray = report.tags;
128+
NSArray *instabugLogs= report.instabugLogs;
129+
NSArray *consoleLogs= report.consoleLogs;
130+
NSDictionary *userAttributes= report.userAttributes;
131+
NSArray *fileAttachments= report.fileLocations;
132+
NSDictionary *dict = @{ @"tagsArray" : tagsArray, @"instabugLogs" : instabugLogs, @"consoleLogs" : consoleLogs, @"userAttributes" : userAttributes, @"fileAttachments" : fileAttachments};
133+
[self sendEventWithName:@"IBGpreSendingHandler" body:dict];
128134
return report;
129135
};
130136
} else {

0 commit comments

Comments
Ā (0)