@@ -13,15 +13,19 @@ + (void)reset {
1313 didInit = NO ;
1414}
1515
16- + (void )initWithToken : (NSString *)token invocationEvents : (IBGInvocationEvent)invocationEvents {
16+ + (void )initWithToken : (NSString *)token
17+ invocationEvents : (IBGInvocationEvent)invocationEvents
18+ useNativeNetworkInterception : (BOOL )useNativeNetworkInterception {
1719
1820 didInit = YES ;
1921
2022 [Instabug setCurrentPlatform: IBGPlatformReactNative];
2123
22- // Disable automatic network logging in the iOS SDK to avoid duplicate network logs coming
23- // from both the iOS and React Native SDKs
24- [IBGNetworkLogger disableAutomaticCapturingOfNetworkLogs ];
24+ if (!useNativeNetworkInterception) {
25+ // Disable automatic network logging in the iOS SDK to avoid duplicate network logs coming
26+ // from both the iOS and React Native SDKs
27+ [IBGNetworkLogger disableAutomaticCapturingOfNetworkLogs ];
28+ }
2529
2630 [Instabug startWithToken: token invocationEvents: invocationEvents];
2731
@@ -37,6 +41,15 @@ + (void)initWithToken:(NSString *)token invocationEvents:(IBGInvocationEvent)inv
3741 IBGAPM.hotAppLaunchEnabled = NO ;
3842}
3943
44+ + (void )initWithToken : (NSString *)token invocationEvents : (IBGInvocationEvent)invocationEvents {
45+ [self initWithToken: token invocationEvents: invocationEvents useNativeNetworkInterception: NO ];
46+ }
47+
48+ + (void )initWithToken : (NSString *)token invocationEvents : (IBGInvocationEvent)invocationEvents debugLogsLevel : (IBGSDKDebugLogsLevel)debugLogsLevel useNativeNetworkInterception : (BOOL )useNativeNetworkInterception {
49+ [Instabug setSdkDebugLogsLevel: debugLogsLevel];
50+ [self initWithToken: token invocationEvents: invocationEvents useNativeNetworkInterception: useNativeNetworkInterception];
51+ }
52+
4053+ (void )initWithToken : (NSString *)token
4154 invocationEvents : (IBGInvocationEvent)invocationEvents
4255 debugLogsLevel : (IBGSDKDebugLogsLevel)debugLogsLevel {
0 commit comments