1616#import < os/log.h>
1717#import < Instabug/IBGTypes.h>
1818#import < React/RCTUIManager.h>
19+ #import " Util/IBGNetworkLogger+CP.h"
1920
2021@interface Instabug (PrivateWillSendAPI)
2122+ (void )setWillSendReportHandler_private : (void (^)(IBGReport *report, void (^reportCompletionHandler)(IBGReport *)))willSendReportHandler_private ;
@@ -53,12 +54,13 @@ - (dispatch_queue_t)methodQueue {
5354 for (NSNumber *boxedValue in invocationEventsArray) {
5455 invocationEvents |= [boxedValue intValue ];
5556 }
57+ [IBGNetworkLogger disableAutomaticCapturingOfNetworkLogs ];
5658 [Instabug startWithToken: token invocationEvents: invocationEvents];
5759 [Instabug setSdkDebugLogsLevel: sdkDebugLogsLevel];
5860
5961 RCTAddLogFunction (InstabugReactLogFunction);
6062 RCTSetLogThreshold (RCTLogLevelInfo);
61-
63+
6264 IBGNetworkLogger.enabled = YES ;
6365
6466 // Temporarily disabling APM hot launches
@@ -72,7 +74,7 @@ - (dispatch_queue_t)methodQueue {
7274 [[Instabug class ] performSelector: setPrivateApiSEL];
7375 } else {
7476 [[Instabug class ] performSelector: setPrivateApiSEL withObject: param];
75-
77+
7678 }
7779 }
7880}
@@ -349,7 +351,7 @@ - (dispatch_queue_t)methodQueue {
349351 int32_t errorCode = [networkData[@" errorCode" ] integerValue ];
350352 int64_t startTime = [networkData[@" startTime" ] integerValue ] * 1000 ;
351353 int64_t duration = [networkData[@" duration" ] doubleValue ] * 1000 ;
352-
354+
353355 NSString * gqlQueryName = nil ;
354356 NSString * serverErrorMessage = nil ;
355357 if (networkData[@" gqlQueryName" ] != [NSNull null ]) {
@@ -360,12 +362,12 @@ - (dispatch_queue_t)methodQueue {
360362 }
361363
362364 SEL networkLogSEL = NSSelectorFromString (@" addNetworkLogWithUrl:method:requestBody:requestBodySize:responseBody:responseBodySize:responseCode:requestHeaders:responseHeaders:contentType:errorDomain:errorCode:startTime:duration:gqlQueryName:serverErrorMessage:" );
363-
365+
364366 if ([[IBGNetworkLogger class ] respondsToSelector: networkLogSEL]) {
365367 NSInvocation *inv = [NSInvocation invocationWithMethodSignature: [[IBGNetworkLogger class ] methodSignatureForSelector: networkLogSEL]];
366368 [inv setSelector: networkLogSEL];
367369 [inv setTarget: [IBGNetworkLogger class ]];
368-
370+
369371 [inv setArgument: &(url) atIndex: 2 ];
370372 [inv setArgument: &(method) atIndex: 3 ];
371373 [inv setArgument: &(requestBody) atIndex: 4 ];
@@ -436,7 +438,7 @@ - (void) setBaseUrlForDeprecationLogs {
436438 [inv setTarget: [Instabug class ]];
437439 IBGPlatform platform = IBGPlatformReactNative;
438440 [inv setArgument: &(platform) atIndex: 2 ];
439-
441+
440442 [inv invoke ];
441443 }
442444}
@@ -469,7 +471,7 @@ void RNIBGLog(IBGLogLevel logLevel, NSString *format, ...) {
469471{
470472 NSString *formatString = @" Instabug - REACT LOG: %@ " ;
471473 NSString *log = RCTFormatLog ([NSDate date ], level, fileName, lineNumber, message);
472-
474+
473475 switch (level) {
474476 case RCTLogLevelTrace:
475477 RNIBGLog (IBGLogLevelVerbose, formatString, log);
0 commit comments