@luciq/react-native 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/FONTS_SETUP_GUIDE.md +521 -0
- package/Gemfile +1 -0
- package/Gemfile.lock +11 -0
- package/LICENSE +21 -0
- package/README.md +148 -0
- package/RNLuciq.podspec +21 -0
- package/android/build.gradle +88 -0
- package/android/gradle.properties +4 -0
- package/android/jacoco.gradle +52 -0
- package/android/native.gradle +7 -0
- package/android/proguard-rules.txt +1 -0
- package/android/sourcemaps.gradle +255 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/ai/luciq/reactlibrary/ArgsRegistry.java +278 -0
- package/android/src/main/java/ai/luciq/reactlibrary/Constants.java +20 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciq.java +328 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqAPMModule.java +392 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqBugReportingModule.java +444 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqCrashReportingModule.java +169 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqFeatureRequestsModule.java +98 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqNetworkLoggerModule.java +195 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativeModule.java +1611 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqReactnativePackage.java +41 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqRepliesModule.java +298 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSessionReplayModule.java +213 -0
- package/android/src/main/java/ai/luciq/reactlibrary/RNLuciqSurveysModule.java +237 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/ArrayUtil.java +167 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/EventEmitterModule.java +35 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/LuciqUtil.java +58 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/MainThreadHandler.java +13 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/MapUtil.java +171 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/RNTouchedViewExtractor.java +167 -0
- package/android/src/main/java/ai/luciq/reactlibrary/utils/ReportUtil.java +67 -0
- package/app.plugin.js +1 -0
- package/babel.config.js +3 -0
- package/bin/commands/MigrateCommand.d.ts +6 -0
- package/bin/commands/UploadEasUpdatesSourcemaps.d.ts +2 -0
- package/bin/commands/UploadSoFiles.d.ts +6 -0
- package/bin/commands/UploadSourcemaps.d.ts +2 -0
- package/bin/config/migration-config.json +125 -0
- package/bin/index.d.ts +2 -0
- package/bin/index.js +19179 -0
- package/bin/upload/index.d.ts +4 -0
- package/bin/upload/migrate.d.ts +14 -0
- package/bin/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
- package/bin/upload/uploadSoFiles.d.ts +21 -0
- package/bin/upload/uploadSourcemaps.d.ts +21 -0
- package/cli/commands/MigrateCommand.ts +32 -0
- package/cli/commands/UploadEasUpdatesSourcemaps.ts +34 -0
- package/cli/commands/UploadSoFiles.ts +38 -0
- package/cli/commands/UploadSourcemaps.ts +40 -0
- package/cli/config/migration-config.json +125 -0
- package/cli/index.ts +21 -0
- package/cli/upload/index.ts +4 -0
- package/cli/upload/migrate.ts +271 -0
- package/cli/upload/uploadEasUpdatesSourcemaps.ts +74 -0
- package/cli/upload/uploadSoFiles.ts +112 -0
- package/cli/upload/uploadSourcemaps.ts +73 -0
- package/dangerfile.ts +44 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +14 -0
- package/dist/models/FeatureFlag.d.ts +11 -0
- package/dist/models/FeatureFlag.js +1 -0
- package/dist/models/LuciqConfig.d.ts +42 -0
- package/dist/models/LuciqConfig.js +1 -0
- package/dist/models/NonFatalOptions.d.ts +15 -0
- package/dist/models/NonFatalOptions.js +1 -0
- package/dist/models/OverAirUpdate.d.ts +12 -0
- package/dist/models/OverAirUpdate.js +1 -0
- package/dist/models/Report.d.ts +70 -0
- package/dist/models/Report.js +109 -0
- package/dist/models/ReproConfig.d.ts +27 -0
- package/dist/models/ReproConfig.js +1 -0
- package/dist/models/SessionMetadata.d.ts +55 -0
- package/dist/models/SessionMetadata.js +1 -0
- package/dist/models/ThemeConfig.d.ts +27 -0
- package/dist/models/ThemeConfig.js +1 -0
- package/dist/models/W3cExternalTraceAttributes.d.ts +22 -0
- package/dist/models/W3cExternalTraceAttributes.js +1 -0
- package/dist/modules/APM.d.ts +77 -0
- package/dist/modules/APM.js +104 -0
- package/dist/modules/BugReporting.d.ts +138 -0
- package/dist/modules/BugReporting.js +202 -0
- package/dist/modules/CrashReporting.d.ts +19 -0
- package/dist/modules/CrashReporting.js +40 -0
- package/dist/modules/FeatureRequests.d.ts +20 -0
- package/dist/modules/FeatureRequests.js +28 -0
- package/dist/modules/Luciq.d.ts +362 -0
- package/dist/modules/Luciq.js +797 -0
- package/dist/modules/NetworkLogger.d.ts +52 -0
- package/dist/modules/NetworkLogger.js +208 -0
- package/dist/modules/Replies.d.ts +78 -0
- package/dist/modules/Replies.js +121 -0
- package/dist/modules/SessionReplay.d.ts +78 -0
- package/dist/modules/SessionReplay.js +98 -0
- package/dist/modules/Surveys.d.ts +75 -0
- package/dist/modules/Surveys.js +101 -0
- package/dist/native/NativeAPM.d.ts +18 -0
- package/dist/native/NativeAPM.js +4 -0
- package/dist/native/NativeBugReporting.d.ts +32 -0
- package/dist/native/NativeBugReporting.js +10 -0
- package/dist/native/NativeConstants.d.ts +182 -0
- package/dist/native/NativeConstants.js +1 -0
- package/dist/native/NativeCrashReporting.d.ts +18 -0
- package/dist/native/NativeCrashReporting.js +2 -0
- package/dist/native/NativeFeatureRequests.d.ts +8 -0
- package/dist/native/NativeFeatureRequests.js +2 -0
- package/dist/native/NativeLuciq.d.ts +86 -0
- package/dist/native/NativeLuciq.js +10 -0
- package/dist/native/NativeNetworkLogger.d.ts +21 -0
- package/dist/native/NativeNetworkLogger.js +14 -0
- package/dist/native/NativePackage.d.ts +21 -0
- package/dist/native/NativePackage.js +2 -0
- package/dist/native/NativeReplies.d.ts +21 -0
- package/dist/native/NativeReplies.js +8 -0
- package/dist/native/NativeSessionReplay.d.ts +16 -0
- package/dist/native/NativeSessionReplay.js +8 -0
- package/dist/native/NativeSurveys.d.ts +22 -0
- package/dist/native/NativeSurveys.js +9 -0
- package/dist/utils/AppStatesHandler.d.ts +3 -0
- package/dist/utils/AppStatesHandler.js +16 -0
- package/dist/utils/Enums.d.ts +244 -0
- package/dist/utils/Enums.js +266 -0
- package/dist/utils/FeatureFlags.d.ts +7 -0
- package/dist/utils/FeatureFlags.js +24 -0
- package/dist/utils/LuciqConstants.d.ts +14 -0
- package/dist/utils/LuciqConstants.js +15 -0
- package/dist/utils/LuciqUtils.d.ts +97 -0
- package/dist/utils/LuciqUtils.js +301 -0
- package/dist/utils/UnhandledRejectionTracking.d.ts +9 -0
- package/dist/utils/UnhandledRejectionTracking.js +99 -0
- package/dist/utils/XhrNetworkInterceptor.d.ts +39 -0
- package/dist/utils/XhrNetworkInterceptor.js +253 -0
- package/dist/utils/config.d.ts +5 -0
- package/dist/utils/config.js +6 -0
- package/dist/utils/logger.d.ts +10 -0
- package/dist/utils/logger.js +39 -0
- package/expo.d.ts +1 -0
- package/expo.js +1 -0
- package/ios/RNLuciq/ArgsRegistry.h +32 -0
- package/ios/RNLuciq/ArgsRegistry.m +276 -0
- package/ios/RNLuciq/LuciqAPMBridge.h +26 -0
- package/ios/RNLuciq/LuciqAPMBridge.m +99 -0
- package/ios/RNLuciq/LuciqBugReportingBridge.h +60 -0
- package/ios/RNLuciq/LuciqBugReportingBridge.m +241 -0
- package/ios/RNLuciq/LuciqCrashReportingBridge.h +18 -0
- package/ios/RNLuciq/LuciqCrashReportingBridge.m +68 -0
- package/ios/RNLuciq/LuciqFeatureRequestsBridge.h +30 -0
- package/ios/RNLuciq/LuciqFeatureRequestsBridge.m +61 -0
- package/ios/RNLuciq/LuciqNetworkLoggerBridge.h +44 -0
- package/ios/RNLuciq/LuciqNetworkLoggerBridge.m +206 -0
- package/ios/RNLuciq/LuciqReactBridge.h +151 -0
- package/ios/RNLuciq/LuciqReactBridge.m +548 -0
- package/ios/RNLuciq/LuciqRepliesBridge.h +40 -0
- package/ios/RNLuciq/LuciqRepliesBridge.m +80 -0
- package/ios/RNLuciq/LuciqSessionReplayBridge.h +32 -0
- package/ios/RNLuciq/LuciqSessionReplayBridge.m +107 -0
- package/ios/RNLuciq/LuciqSurveysBridge.h +46 -0
- package/ios/RNLuciq/LuciqSurveysBridge.m +107 -0
- package/ios/RNLuciq/RCTConvert+LuciqEnums.h +18 -0
- package/ios/RNLuciq/RCTConvert+LuciqEnums.m +127 -0
- package/ios/RNLuciq/RNLuciq.h +35 -0
- package/ios/RNLuciq/RNLuciq.m +107 -0
- package/ios/RNLuciq/Util/LCQAPM+PrivateAPIs.h +15 -0
- package/ios/RNLuciq/Util/LCQCrashReporting+CP.h +13 -0
- package/ios/RNLuciq/Util/LCQNetworkLogger+CP.h +68 -0
- package/ios/RNLuciq/Util/Luciq+CP.h +12 -0
- package/ios/RNLuciq.xcodeproj/project.pbxproj +352 -0
- package/ios/native.rb +12 -0
- package/ios/sourcemaps.sh +120 -0
- package/migrate.js +569 -0
- package/package.json +92 -0
- package/plugin/build/index.js +42078 -0
- package/plugin/src/index.ts +5 -0
- package/plugin/src/pluginProps.ts +6 -0
- package/plugin/src/withLuciq.ts +51 -0
- package/plugin/src/withLuciqAndroid.ts +99 -0
- package/plugin/src/withLuciqIOS.ts +109 -0
- package/plugin/tsconfig.json +7 -0
- package/react-native.config.js +16 -0
- package/scripts/customize-ios-endpoints.sh +28 -0
- package/scripts/dream-11-delete-unused-features.sh +62 -0
- package/scripts/find-token.js +58 -0
- package/scripts/find-token.sh +70 -0
- package/scripts/notify-github.sh +15 -0
- package/scripts/replace.js +58 -0
- package/scripts/snapshot-comment.md +15 -0
- package/scripts/snapshot-version.sh +11 -0
- package/src/index.ts +40 -0
- package/src/models/FeatureFlag.ts +12 -0
- package/src/models/LuciqConfig.ts +48 -0
- package/src/models/NonFatalOptions.ts +16 -0
- package/src/models/OverAirUpdate.ts +14 -0
- package/src/models/Report.ts +124 -0
- package/src/models/ReproConfig.ts +31 -0
- package/src/models/SessionMetadata.ts +57 -0
- package/src/models/ThemeConfig.ts +34 -0
- package/src/models/W3cExternalTraceAttributes.ts +22 -0
- package/src/modules/APM.ts +117 -0
- package/src/modules/BugReporting.ts +254 -0
- package/src/modules/CrashReporting.ts +54 -0
- package/src/modules/FeatureRequests.ts +32 -0
- package/src/modules/Luciq.ts +934 -0
- package/src/modules/NetworkLogger.ts +270 -0
- package/src/modules/Replies.ts +137 -0
- package/src/modules/SessionReplay.ts +111 -0
- package/src/modules/Surveys.ts +118 -0
- package/src/native/NativeAPM.ts +51 -0
- package/src/native/NativeBugReporting.ts +70 -0
- package/src/native/NativeConstants.ts +215 -0
- package/src/native/NativeCrashReporting.ts +29 -0
- package/src/native/NativeFeatureRequests.ts +12 -0
- package/src/native/NativeLuciq.ts +179 -0
- package/src/native/NativeNetworkLogger.ts +42 -0
- package/src/native/NativePackage.ts +25 -0
- package/src/native/NativeReplies.ts +34 -0
- package/src/native/NativeSessionReplay.ts +21 -0
- package/src/native/NativeSurveys.ts +34 -0
- package/src/promise.d.ts +11 -0
- package/src/utils/AppStatesHandler.ts +19 -0
- package/src/utils/Enums.ts +266 -0
- package/src/utils/FeatureFlags.ts +33 -0
- package/src/utils/LuciqConstants.ts +24 -0
- package/src/utils/LuciqUtils.ts +417 -0
- package/src/utils/UnhandledRejectionTracking.ts +118 -0
- package/src/utils/XhrNetworkInterceptor.ts +333 -0
- package/src/utils/config.ts +7 -0
- package/src/utils/logger.ts +54 -0
- package/tsconfig.json +32 -0
- package/tsconfig.test.json +4 -0
- package/tsconfig.upload.json +10 -0
- package/upload/index.d.ts +4 -0
- package/upload/index.js +17314 -0
- package/upload/migrate.d.ts +14 -0
- package/upload/package.json +5 -0
- package/upload/uploadEasUpdatesSourcemaps.d.ts +21 -0
- package/upload/uploadSoFiles.d.ts +21 -0
- package/upload/uploadSourcemaps.d.ts +21 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
#import "LuciqAPMBridge.h"
|
|
4
|
+
#import <LuciqSDK/LCQAPM.h>
|
|
5
|
+
#import <asl.h>
|
|
6
|
+
#import <React/RCTLog.h>
|
|
7
|
+
#import <os/log.h>
|
|
8
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
9
|
+
#import <React/RCTUIManager.h>
|
|
10
|
+
#import "Util/LCQAPM+PrivateAPIs.h"
|
|
11
|
+
|
|
12
|
+
@implementation LuciqAPMBridge
|
|
13
|
+
|
|
14
|
+
- (dispatch_queue_t)methodQueue {
|
|
15
|
+
return dispatch_get_main_queue();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
+ (BOOL)requiresMainQueueSetup
|
|
19
|
+
{
|
|
20
|
+
return NO;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
- (NSArray<NSString *> *)supportedEvents {
|
|
24
|
+
return @[];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
RCT_EXPORT_MODULE(LCQAPM)
|
|
28
|
+
|
|
29
|
+
- (id) init
|
|
30
|
+
{
|
|
31
|
+
self = [super init];
|
|
32
|
+
return self;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Pauses the current thread for 3 seconds.
|
|
36
|
+
RCT_EXPORT_METHOD(LCQSleep) {
|
|
37
|
+
[NSThread sleepForTimeInterval:3.0f];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Enables or disables APM.
|
|
41
|
+
RCT_EXPORT_METHOD(setEnabled:(BOOL)isEnabled) {
|
|
42
|
+
LCQAPM.enabled = isEnabled;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Determines either coldAppLaunch is enabled or not.
|
|
46
|
+
RCT_EXPORT_METHOD(setAppLaunchEnabled:(BOOL)isEnabled) {
|
|
47
|
+
LCQAPM.coldAppLaunchEnabled = isEnabled;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// This method is used to signal the end of the app launch process.
|
|
51
|
+
RCT_EXPORT_METHOD(endAppLaunch) {
|
|
52
|
+
[LCQAPM endAppLaunch];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Controls whether automatic tracing of UI interactions is enabled or disabled within the SDK.
|
|
56
|
+
RCT_EXPORT_METHOD(setAutoUITraceEnabled:(BOOL)isEnabled) {
|
|
57
|
+
LCQAPM.autoUITraceEnabled = isEnabled;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Starts a flow trace with the specified `name`,
|
|
61
|
+
// allowing the SDK to capture and analyze the flow of execution within the application.
|
|
62
|
+
RCT_EXPORT_METHOD(startFlow: (NSString *)name) {
|
|
63
|
+
[LCQAPM startFlowWithName:name];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Ends a flow with the specified `name`.
|
|
67
|
+
RCT_EXPORT_METHOD(endFlow: (NSString *)name) {
|
|
68
|
+
[LCQAPM endFlowWithName:name];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
// Sets a user defined attribute for the currently active flow.
|
|
73
|
+
RCT_EXPORT_METHOD(setFlowAttribute:(NSString *)name :(NSString *)key :(NSString *_Nullable)value) {
|
|
74
|
+
[LCQAPM setAttributeForFlowWithName:name key:key value:value];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Starts a new `UITrace` with the provided `name` parameter,
|
|
78
|
+
// allowing the SDK to capture and analyze the UI components within the application.
|
|
79
|
+
RCT_EXPORT_METHOD(startUITrace:(NSString *)name) {
|
|
80
|
+
[LCQAPM startUITraceWithName:name];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Terminates the currently active UI trace.
|
|
84
|
+
RCT_EXPORT_METHOD(endUITrace) {
|
|
85
|
+
[LCQAPM endUITrace];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
@synthesize description;
|
|
93
|
+
|
|
94
|
+
@synthesize hash;
|
|
95
|
+
|
|
96
|
+
@synthesize superclass;
|
|
97
|
+
|
|
98
|
+
@end
|
|
99
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//
|
|
2
|
+
// LuciqBugReportingBridge.h
|
|
3
|
+
// RNLuciq
|
|
4
|
+
//
|
|
5
|
+
// Created by Salma Ali on 7/30/19.
|
|
6
|
+
// Copyright © 2019 luciq. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import <React/RCTBridgeModule.h>
|
|
11
|
+
#import <React/RCTEventEmitter.h>
|
|
12
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
13
|
+
#import <LuciqSDK/LCQBugReporting.h>
|
|
14
|
+
|
|
15
|
+
@interface LuciqBugReportingBridge : RCTEventEmitter <RCTBridgeModule>
|
|
16
|
+
/*
|
|
17
|
+
+------------------------------------------------------------------------+
|
|
18
|
+
| BugReporting Module |
|
|
19
|
+
+------------------------------------------------------------------------+
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
- (void)setEnabled:(BOOL)isEnabled;
|
|
23
|
+
|
|
24
|
+
- (void)setInvocationEvents:(NSArray *)invocationEventsArray;
|
|
25
|
+
|
|
26
|
+
- (void)setOptions:(NSArray *)optionsArray;
|
|
27
|
+
|
|
28
|
+
- (void)setFloatingButtonEdge:(CGRectEdge)floatingButtonEdge withTopOffset:(double)floatingButtonOffsetFromTop;
|
|
29
|
+
|
|
30
|
+
- (void)setOnInvokeHandler:(RCTResponseSenderBlock)callBack;
|
|
31
|
+
|
|
32
|
+
- (void)setOnSDKDismissedHandler:(RCTResponseSenderBlock)callBack;
|
|
33
|
+
|
|
34
|
+
- (void)setShakingThresholdForiPhone:(double)iPhoneShakingThreshold;
|
|
35
|
+
|
|
36
|
+
- (void)setShakingThresholdForiPad:(double)iPadShakingThreshold;
|
|
37
|
+
|
|
38
|
+
- (void)setExtendedBugReportMode:(LCQExtendedBugReportMode)extendedBugReportMode;
|
|
39
|
+
|
|
40
|
+
- (void)setReportTypes:(NSArray *)types;
|
|
41
|
+
|
|
42
|
+
- (void)show:(LCQBugReportingReportType)type options:(NSArray *)options;
|
|
43
|
+
|
|
44
|
+
- (void)setAutoScreenRecordingEnabled:(BOOL)enabled;
|
|
45
|
+
|
|
46
|
+
- (void)setAutoScreenRecordingDuration:(CGFloat)duration;
|
|
47
|
+
|
|
48
|
+
- (void)setViewHierarchyEnabled:(BOOL)viewHirearchyEnabled;
|
|
49
|
+
|
|
50
|
+
- (void)setDisclaimerText:(NSString *)text;
|
|
51
|
+
|
|
52
|
+
- (void)setCommentMinimumCharacterCount:(NSNumber *)limit reportTypes:(NSArray *)reportTypes;
|
|
53
|
+
|
|
54
|
+
- (void)addUserConsent:(NSString *)key
|
|
55
|
+
description:(NSString *)description
|
|
56
|
+
mandatory:(BOOL)mandatory
|
|
57
|
+
checked:(BOOL)checked
|
|
58
|
+
actionType:(id)actionType;
|
|
59
|
+
|
|
60
|
+
@end
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
//
|
|
2
|
+
// LuciqBugReportingBridge.m
|
|
3
|
+
// RNLuciq
|
|
4
|
+
//
|
|
5
|
+
// Created by Salma Ali on 7/30/19.
|
|
6
|
+
// Copyright © 2019 luciq. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "LuciqBugReportingBridge.h"
|
|
10
|
+
#import <LuciqSDK/LCQBugReporting.h>
|
|
11
|
+
#import <asl.h>
|
|
12
|
+
#import <React/RCTLog.h>
|
|
13
|
+
#import <os/log.h>
|
|
14
|
+
#import <React/RCTUIManager.h>
|
|
15
|
+
|
|
16
|
+
@implementation LuciqBugReportingBridge
|
|
17
|
+
|
|
18
|
+
- (dispatch_queue_t)methodQueue {
|
|
19
|
+
return dispatch_get_main_queue();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
+ (BOOL)requiresMainQueueSetup
|
|
23
|
+
{
|
|
24
|
+
return NO;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
- (NSArray<NSString *> *)supportedEvents {
|
|
28
|
+
return @[
|
|
29
|
+
@"LCQpreInvocationHandler",
|
|
30
|
+
@"LCQpostInvocationHandler",
|
|
31
|
+
@"LCQDidSelectPromptOptionHandler",
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
RCT_EXPORT_MODULE(LCQBugReporting)
|
|
36
|
+
|
|
37
|
+
RCT_EXPORT_METHOD(setEnabled:(BOOL) isEnabled) {
|
|
38
|
+
LCQBugReporting.enabled = isEnabled;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
RCT_EXPORT_METHOD(setAutoScreenRecordingEnabled:(BOOL)enabled) {
|
|
42
|
+
LCQBugReporting.autoScreenRecordingEnabled = enabled;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
RCT_EXPORT_METHOD(setAutoScreenRecordingDuration:(CGFloat)duration) {
|
|
46
|
+
LCQBugReporting.autoScreenRecordingDuration = duration;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
RCT_EXPORT_METHOD(setOnInvokeHandler:(RCTResponseSenderBlock)callBack) {
|
|
50
|
+
if (callBack != nil) {
|
|
51
|
+
LCQBugReporting.willInvokeHandler = ^{
|
|
52
|
+
[self sendEventWithName:@"LCQpreInvocationHandler" body:nil];
|
|
53
|
+
};
|
|
54
|
+
} else {
|
|
55
|
+
LCQBugReporting.willInvokeHandler = nil;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
RCT_EXPORT_METHOD(setOnSDKDismissedHandler:(RCTResponseSenderBlock)callBack) {
|
|
60
|
+
if (callBack != nil) {
|
|
61
|
+
LCQBugReporting.didDismissHandler = ^(LCQDismissType dismissType, LCQReportCategory reportType) {
|
|
62
|
+
|
|
63
|
+
//parse dismiss type enum
|
|
64
|
+
NSString* dismissTypeString;
|
|
65
|
+
if (dismissType == LCQDismissTypeCancel) {
|
|
66
|
+
dismissTypeString = @"CANCEL";
|
|
67
|
+
} else if (dismissType == LCQDismissTypeSubmit) {
|
|
68
|
+
dismissTypeString = @"SUBMIT";
|
|
69
|
+
} else if (dismissType == LCQDismissTypeAddAttachment) {
|
|
70
|
+
dismissTypeString = @"ADD_ATTACHMENT";
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//parse report type enum
|
|
74
|
+
NSString* reportTypeString;
|
|
75
|
+
if (reportType == LCQReportCategoryBug) {
|
|
76
|
+
reportTypeString = @"bug";
|
|
77
|
+
} else if (reportType == LCQReportCategoryFeedback) {
|
|
78
|
+
reportTypeString = @"feedback";
|
|
79
|
+
} else {
|
|
80
|
+
reportTypeString = @"other";
|
|
81
|
+
}
|
|
82
|
+
NSDictionary *result = @{ @"dismissType": dismissTypeString,
|
|
83
|
+
@"reportType": reportTypeString};
|
|
84
|
+
[self sendEventWithName:@"LCQpostInvocationHandler" body: result];
|
|
85
|
+
};
|
|
86
|
+
} else {
|
|
87
|
+
LCQBugReporting.didDismissHandler = nil;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
RCT_EXPORT_METHOD(setDidSelectPromptOptionHandler:(RCTResponseSenderBlock)callBack) {
|
|
92
|
+
if (callBack != nil) {
|
|
93
|
+
|
|
94
|
+
LCQBugReporting.didSelectPromptOptionHandler = ^(LCQPromptOption promptOption) {
|
|
95
|
+
|
|
96
|
+
NSString *promptOptionString;
|
|
97
|
+
if (promptOption == LCQPromptOptionBug) {
|
|
98
|
+
promptOptionString = @"bug";
|
|
99
|
+
} else if (promptOption == LCQBugReportingTypeFeedback) {
|
|
100
|
+
promptOptionString = @"feedback";
|
|
101
|
+
} else if (promptOption == LCQPromptOptionChat) {
|
|
102
|
+
promptOptionString = @"chat";
|
|
103
|
+
} else {
|
|
104
|
+
promptOptionString = @"none";
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
[self sendEventWithName:@"LCQDidSelectPromptOptionHandler" body:@{
|
|
108
|
+
@"promptOption": promptOptionString
|
|
109
|
+
}];
|
|
110
|
+
};
|
|
111
|
+
} else {
|
|
112
|
+
LCQBugReporting.didSelectPromptOptionHandler = nil;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
RCT_EXPORT_METHOD(setInvocationEvents:(NSArray*)invocationEventsArray) {
|
|
117
|
+
LCQInvocationEvent invocationEvents = 0;
|
|
118
|
+
for (NSNumber *boxedValue in invocationEventsArray) {
|
|
119
|
+
invocationEvents |= [boxedValue intValue];
|
|
120
|
+
}
|
|
121
|
+
LCQBugReporting.invocationEvents = invocationEvents;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
RCT_EXPORT_METHOD(setOptions:(NSArray*)invocationOptionsArray) {
|
|
125
|
+
LCQBugReportingOption invocationOptions = 0;
|
|
126
|
+
|
|
127
|
+
for (NSNumber *boxedValue in invocationOptionsArray) {
|
|
128
|
+
invocationOptions |= [boxedValue intValue];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
LCQBugReporting.bugReportingOptions = invocationOptions;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
RCT_EXPORT_METHOD(setFloatingButtonEdge:(CGRectEdge)floatingButtonEdge withTopOffset:(double)floatingButtonOffsetFromTop) {
|
|
135
|
+
LCQBugReporting.floatingButtonEdge = floatingButtonEdge;
|
|
136
|
+
LCQBugReporting.floatingButtonTopOffset = floatingButtonOffsetFromTop;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
RCT_EXPORT_METHOD(setExtendedBugReportMode:(LCQExtendedBugReportMode)extendedBugReportMode) {
|
|
140
|
+
LCQBugReporting.extendedBugReportMode = extendedBugReportMode;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
RCT_EXPORT_METHOD(setEnabledAttachmentTypes:(BOOL)screenShot
|
|
144
|
+
extraScreenShot:(BOOL)extraScreenShot
|
|
145
|
+
galleryImage:(BOOL)galleryImage
|
|
146
|
+
screenRecording:(BOOL)screenRecording) {
|
|
147
|
+
LCQAttachmentType attachmentTypes = 0;
|
|
148
|
+
if(screenShot) {
|
|
149
|
+
attachmentTypes = LCQAttachmentTypeScreenShot;
|
|
150
|
+
}
|
|
151
|
+
if(extraScreenShot) {
|
|
152
|
+
attachmentTypes |= LCQAttachmentTypeExtraScreenShot;
|
|
153
|
+
}
|
|
154
|
+
if(galleryImage) {
|
|
155
|
+
attachmentTypes |= LCQAttachmentTypeGalleryImage;
|
|
156
|
+
}
|
|
157
|
+
if(screenRecording) {
|
|
158
|
+
attachmentTypes |= LCQAttachmentTypeScreenRecording;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
LCQBugReporting.enabledAttachmentTypes = attachmentTypes;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
RCT_EXPORT_METHOD(setViewHierarchyEnabled:(BOOL)viewHirearchyEnabled) {
|
|
165
|
+
LCQBugReporting.shouldCaptureViewHierarchy = viewHirearchyEnabled;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
RCT_EXPORT_METHOD(setVideoRecordingFloatingButtonPosition:(LCQPosition)position) {
|
|
169
|
+
LCQBugReporting.videoRecordingFloatingButtonPosition = position;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
RCT_EXPORT_METHOD(setReportTypes:(NSArray*) types ) {
|
|
173
|
+
LCQBugReportingReportType reportTypes = 0;
|
|
174
|
+
for (NSNumber *boxedValue in types) {
|
|
175
|
+
reportTypes |= [boxedValue intValue];
|
|
176
|
+
}
|
|
177
|
+
[LCQBugReporting setPromptOptionsEnabledReportTypes: reportTypes];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
RCT_EXPORT_METHOD(show:(LCQBugReportingReportType)type options:(NSArray*) options) {
|
|
181
|
+
LCQBugReportingOption parsedOptions = 0;
|
|
182
|
+
for (NSNumber *boxedValue in options) {
|
|
183
|
+
parsedOptions |= [boxedValue intValue];
|
|
184
|
+
}
|
|
185
|
+
NSArray* args = @[@(type), @(parsedOptions)];
|
|
186
|
+
[[NSRunLoop mainRunLoop] performSelector:@selector(showBugReportingWithReportTypeAndOptionsHelper:) target:self argument:args order:0 modes:@[NSDefaultRunLoopMode]];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
- (void) showBugReportingWithReportTypeAndOptionsHelper:(NSArray*)args {
|
|
190
|
+
LCQBugReportingReportType parsedreportType = [args[0] intValue];
|
|
191
|
+
LCQBugReportingOption parsedOptions = [args[1] intValue];
|
|
192
|
+
[LCQBugReporting showWithReportType:parsedreportType options:parsedOptions];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
RCT_EXPORT_METHOD(setShakingThresholdForiPhone:(double)iPhoneShakingThreshold) {
|
|
196
|
+
LCQBugReporting.shakingThresholdForiPhone = iPhoneShakingThreshold;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
RCT_EXPORT_METHOD(setShakingThresholdForiPad:(double)iPadShakingThreshold) {
|
|
200
|
+
LCQBugReporting.shakingThresholdForiPad = iPadShakingThreshold;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
RCT_EXPORT_METHOD(setDisclaimerText:(NSString*)text) {
|
|
204
|
+
[LCQBugReporting setDisclaimerText:text];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
RCT_EXPORT_METHOD(setCommentMinimumCharacterCount:(nonnull NSNumber *)limit reportTypes:(NSArray *)reportTypes) {
|
|
208
|
+
LCQBugReportingType parsedReportTypes = 0;
|
|
209
|
+
if (![reportTypes count]) {
|
|
210
|
+
parsedReportTypes = @(LCQBugReportingTypeBug).integerValue | @(LCQBugReportingTypeFeedback).integerValue | @(LCQBugReportingTypeQuestion).integerValue;
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
for (NSNumber *reportType in reportTypes) {
|
|
214
|
+
parsedReportTypes |= [reportType intValue];
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
[LCQBugReporting setCommentMinimumCharacterCount:[limit integerValue] forBugReportType:parsedReportTypes];
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
RCT_EXPORT_METHOD(addUserConsent:(NSString *)key
|
|
221
|
+
description:(NSString *)description
|
|
222
|
+
mandatory:(BOOL)mandatory
|
|
223
|
+
checked:(BOOL)checked
|
|
224
|
+
actionType:(id)actionType) {
|
|
225
|
+
LCQConsentAction mappedActionType = (LCQConsentAction)[actionType integerValue];
|
|
226
|
+
|
|
227
|
+
[LCQBugReporting addUserConsentWithKey:key
|
|
228
|
+
description:description
|
|
229
|
+
mandatory:mandatory
|
|
230
|
+
checked:checked
|
|
231
|
+
actionType:mappedActionType];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
@synthesize description;
|
|
236
|
+
|
|
237
|
+
@synthesize hash;
|
|
238
|
+
|
|
239
|
+
@synthesize superclass;
|
|
240
|
+
|
|
241
|
+
@end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#import <Foundation/Foundation.h>
|
|
2
|
+
#import <React/RCTBridgeModule.h>
|
|
3
|
+
#import <React/RCTEventEmitter.h>
|
|
4
|
+
#import <LuciqSDK/LCQBugReporting.h>
|
|
5
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
6
|
+
#import <LuciqSDK/LCQCrashReporting.h>
|
|
7
|
+
#import <LuciqSDK/LuciqSDK.h>
|
|
8
|
+
#import "ArgsRegistry.h"
|
|
9
|
+
|
|
10
|
+
@interface LuciqCrashReportingBridge : RCTEventEmitter <RCTBridgeModule>
|
|
11
|
+
|
|
12
|
+
- (void)setEnabled:(BOOL) isEnabled;
|
|
13
|
+
- (void)sendJSCrash:(NSDictionary *_Nonnull )stackTrace resolver:(RCTPromiseResolveBlock _Nullable )resolve
|
|
14
|
+
rejecter:(RCTPromiseRejectBlock _Nullable )reject;
|
|
15
|
+
- (void)sendHandledJSCrash:(NSDictionary *_Nonnull)stackTrace userAttributes:(nullable NSDictionary *)userAttributes fingerprint:(nullable NSString *)fingerprint nonFatalExceptionLevel:(LCQNonFatalLevel) nonFatalExceptionLevel resolver:(RCTPromiseResolveBlock _Nullable )resolve
|
|
16
|
+
rejecter:(RCTPromiseRejectBlock _Nullable )reject;
|
|
17
|
+
|
|
18
|
+
@end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#import "LuciqCrashReportingBridge.h"
|
|
2
|
+
#import "Util/LCQCrashReporting+CP.h"
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@implementation LuciqCrashReportingBridge
|
|
6
|
+
|
|
7
|
+
- (dispatch_queue_t)methodQueue {
|
|
8
|
+
return dispatch_get_main_queue();
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
+ (BOOL)requiresMainQueueSetup
|
|
12
|
+
{
|
|
13
|
+
return NO;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
- (NSArray<NSString *> *)supportedEvents {
|
|
17
|
+
return @[
|
|
18
|
+
@"LCQSendHandledJSCrash",
|
|
19
|
+
@"LCQSendUnhandledJSCrash",
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
RCT_EXPORT_MODULE(LCQCrashReporting)
|
|
24
|
+
|
|
25
|
+
RCT_EXPORT_METHOD(setEnabled: (BOOL) isEnabled) {
|
|
26
|
+
LCQCrashReporting.enabled = isEnabled;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
RCT_EXPORT_METHOD(sendJSCrash:(NSDictionary *)stackTrace
|
|
30
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
31
|
+
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
32
|
+
|
|
33
|
+
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul);
|
|
34
|
+
dispatch_async(queue, ^{
|
|
35
|
+
[LCQCrashReporting cp_reportFatalCrashWithStackTrace:stackTrace];
|
|
36
|
+
resolve([NSNull null]);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
RCT_EXPORT_METHOD(sendHandledJSCrash: (NSDictionary *)stackTrace
|
|
41
|
+
userAttributes:(nullable NSDictionary *)userAttributes fingerprint:(nullable NSString *)fingerprint nonFatalExceptionLevel:(LCQNonFatalLevel)nonFatalExceptionLevel
|
|
42
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
43
|
+
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
44
|
+
|
|
45
|
+
if([fingerprint isKindOfClass:NSNull.class]){
|
|
46
|
+
fingerprint = nil;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if([userAttributes isKindOfClass:NSNull.class]){
|
|
50
|
+
userAttributes = nil;
|
|
51
|
+
}
|
|
52
|
+
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
|
|
53
|
+
dispatch_async(queue, ^{
|
|
54
|
+
[LCQCrashReporting cp_reportNonFatalCrashWithStackTrace:stackTrace level:nonFatalExceptionLevel groupingString:fingerprint userAttributes:userAttributes];
|
|
55
|
+
|
|
56
|
+
resolve([NSNull null]);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
}
|
|
60
|
+
@synthesize description;
|
|
61
|
+
|
|
62
|
+
@synthesize hash;
|
|
63
|
+
|
|
64
|
+
@synthesize superclass;
|
|
65
|
+
|
|
66
|
+
@end
|
|
67
|
+
|
|
68
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//
|
|
2
|
+
// LuciqFeatureRequestsBridge.h
|
|
3
|
+
// RNLuciq
|
|
4
|
+
//
|
|
5
|
+
// Created by Salma Ali on 7/30/19.
|
|
6
|
+
// Copyright © 2019 luciq. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import <Foundation/Foundation.h>
|
|
10
|
+
#import <React/RCTBridgeModule.h>
|
|
11
|
+
#import <React/RCTEventEmitter.h>
|
|
12
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
13
|
+
|
|
14
|
+
@interface LuciqFeatureRequestsBridge : RCTEventEmitter <RCTBridgeModule>
|
|
15
|
+
/*
|
|
16
|
+
+------------------------------------------------------------------------+
|
|
17
|
+
| Feature Requests Module |
|
|
18
|
+
+------------------------------------------------------------------------+
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
- (void)setEmailFieldRequiredForFeatureRequests:(BOOL)isEmailFieldRequired forAction:(NSArray *)actionTypesArray;
|
|
22
|
+
|
|
23
|
+
- (void)show;
|
|
24
|
+
|
|
25
|
+
- (void)setEnabled:(BOOL) isEnabled;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@end
|
|
29
|
+
|
|
30
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
//
|
|
2
|
+
// LuciqFeatureRequestsBridge.m
|
|
3
|
+
// RNLuciq
|
|
4
|
+
//
|
|
5
|
+
// Created by Salma Ali on 7/30/19.
|
|
6
|
+
// Copyright © 2019 luciq. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "LuciqFeatureRequestsBridge.h"
|
|
10
|
+
#import <LuciqSDK/LCQFeatureRequests.h>
|
|
11
|
+
#import <asl.h>
|
|
12
|
+
#import <React/RCTLog.h>
|
|
13
|
+
#import <os/log.h>
|
|
14
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
15
|
+
#import <React/RCTUIManager.h>
|
|
16
|
+
|
|
17
|
+
@implementation LuciqFeatureRequestsBridge
|
|
18
|
+
|
|
19
|
+
- (dispatch_queue_t)methodQueue {
|
|
20
|
+
return dispatch_get_main_queue();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
+ (BOOL)requiresMainQueueSetup
|
|
24
|
+
{
|
|
25
|
+
return NO;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
- (NSArray<NSString *> *)supportedEvents {
|
|
29
|
+
return @[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
RCT_EXPORT_MODULE(LCQFeatureRequests)
|
|
33
|
+
|
|
34
|
+
RCT_EXPORT_METHOD(show) {
|
|
35
|
+
[[NSRunLoop mainRunLoop] performSelector:@selector(show) target:[LCQFeatureRequests class] argument:nil order:0 modes:@[NSDefaultRunLoopMode]];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
RCT_EXPORT_METHOD(setEmailFieldRequiredForFeatureRequests:(BOOL)isEmailFieldRequired
|
|
39
|
+
forAction:(NSArray *)actionTypesArray) {
|
|
40
|
+
LCQAction actionTypes = 0;
|
|
41
|
+
|
|
42
|
+
for (NSNumber *boxedValue in actionTypesArray) {
|
|
43
|
+
actionTypes |= [boxedValue intValue];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[LCQFeatureRequests setEmailFieldRequired:isEmailFieldRequired forAction:actionTypes];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
RCT_EXPORT_METHOD(setEnabled: (BOOL) isEnabled) {
|
|
50
|
+
LCQFeatureRequests.enabled = isEnabled;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@synthesize description;
|
|
54
|
+
|
|
55
|
+
@synthesize hash;
|
|
56
|
+
|
|
57
|
+
@synthesize superclass;
|
|
58
|
+
|
|
59
|
+
@end
|
|
60
|
+
|
|
61
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#import <React/RCTBridgeModule.h>
|
|
2
|
+
#import <React/RCTEventEmitter.h>
|
|
3
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
4
|
+
|
|
5
|
+
typedef void (^ LCQURLRequestAsyncObfuscationCompletedHandler)(NSURLRequest * _Nonnull request);
|
|
6
|
+
typedef void (^LCQURLRequestResponseAsyncFilteringCompletedHandler)(BOOL keep);
|
|
7
|
+
|
|
8
|
+
typedef NS_ENUM(NSInteger, NetworkListenerType) {
|
|
9
|
+
NetworkListenerTypeFiltering,
|
|
10
|
+
NetworkListenerTypeObfuscation,
|
|
11
|
+
NetworkListenerTypeBoth
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
@interface LuciqNetworkLoggerBridge : RCTEventEmitter <RCTBridgeModule>
|
|
15
|
+
|
|
16
|
+
@property NSMutableDictionary<NSString *, LCQURLRequestAsyncObfuscationCompletedHandler> * _Nonnull requestObfuscationCompletionDictionary;
|
|
17
|
+
@property NSMutableDictionary<NSString *, NetworkObfuscationCompletionBlock> * _Nonnull responseObfuscationCompletionDictionary;
|
|
18
|
+
@property NSMutableDictionary<NSString *, LCQURLRequestResponseAsyncFilteringCompletedHandler> * _Nonnull requestFilteringCompletionDictionary;
|
|
19
|
+
@property NSMutableDictionary<NSString *, LCQURLRequestResponseAsyncFilteringCompletedHandler> * _Nonnull responseFilteringCompletionDictionary;
|
|
20
|
+
|
|
21
|
+
/*
|
|
22
|
+
+------------------------------------------------------------------------+
|
|
23
|
+
| NetworkLogger Module |
|
|
24
|
+
+------------------------------------------------------------------------+
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
- (BOOL)isNativeInterceptionEnabled;
|
|
28
|
+
|
|
29
|
+
- (void) registerNetworkLogsListener:(NetworkListenerType)listenerType;
|
|
30
|
+
|
|
31
|
+
- (void)updateNetworkLogSnapshot:(NSString * _Nonnull)url
|
|
32
|
+
callbackID:(NSString * _Nonnull)callbackID
|
|
33
|
+
requestBody:(NSString * _Nullable)requestBody
|
|
34
|
+
responseBody:(NSString * _Nullable)responseBody
|
|
35
|
+
responseCode:(double)responseCode
|
|
36
|
+
requestHeaders:(NSDictionary * _Nullable)requestHeaders
|
|
37
|
+
responseHeaders:(NSDictionary * _Nullable)responseHeaders;
|
|
38
|
+
|
|
39
|
+
- (void) setNetworkLoggingRequestFilterPredicateIOS:(NSString * _Nonnull) callbackID : (BOOL)value;
|
|
40
|
+
|
|
41
|
+
- (void)forceStartNetworkLoggingIOS;
|
|
42
|
+
|
|
43
|
+
- (void)forceStopNetworkLoggingIOS;
|
|
44
|
+
@end
|