@@ -13,15 +13,19 @@ + (void)reset {
13
13
didInit = NO ;
14
14
}
15
15
16
- + (void )initWithToken : (NSString *)token invocationEvents : (IBGInvocationEvent)invocationEvents {
16
+ + (void )initWithToken : (NSString *)token
17
+ invocationEvents : (IBGInvocationEvent)invocationEvents
18
+ useNativeNetworkInterception : (BOOL )useNativeNetworkInterception {
17
19
18
20
didInit = YES ;
19
21
20
22
[Instabug setCurrentPlatform: IBGPlatformReactNative];
21
23
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
+ }
25
29
26
30
[Instabug startWithToken: token invocationEvents: invocationEvents];
27
31
@@ -37,6 +41,15 @@ + (void)initWithToken:(NSString *)token invocationEvents:(IBGInvocationEvent)inv
37
41
IBGAPM.hotAppLaunchEnabled = NO ;
38
42
}
39
43
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
+
40
53
+ (void )initWithToken : (NSString *)token
41
54
invocationEvents : (IBGInvocationEvent)invocationEvents
42
55
debugLogsLevel : (IBGSDKDebugLogsLevel)debugLogsLevel {
0 commit comments