@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,107 @@
|
|
|
1
|
+
#import <asl.h>
|
|
2
|
+
#import <React/RCTLog.h>
|
|
3
|
+
#import <os/log.h>
|
|
4
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
5
|
+
#import <React/RCTUIManager.h>
|
|
6
|
+
#import <LuciqSDK/LCQSessionReplay.h>
|
|
7
|
+
#import "LuciqSessionReplayBridge.h"
|
|
8
|
+
|
|
9
|
+
@implementation LuciqSessionReplayBridge
|
|
10
|
+
|
|
11
|
+
- (dispatch_queue_t)methodQueue {
|
|
12
|
+
return dispatch_get_main_queue();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
+ (BOOL)requiresMainQueueSetup
|
|
16
|
+
{
|
|
17
|
+
return NO;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
- (NSArray<NSString *> *)supportedEvents {
|
|
21
|
+
return @[
|
|
22
|
+
@"LCQSessionReplayOnSyncCallback",
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
RCT_EXPORT_MODULE(LCQSessionReplay)
|
|
27
|
+
|
|
28
|
+
RCT_EXPORT_METHOD(setEnabled:(BOOL)isEnabled) {
|
|
29
|
+
LCQSessionReplay.enabled = isEnabled;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
RCT_EXPORT_METHOD(setNetworkLogsEnabled:(BOOL)isEnabled) {
|
|
33
|
+
LCQSessionReplay.networkLogsEnabled = isEnabled;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
RCT_EXPORT_METHOD(setLuciqLogsEnabled:(BOOL)isEnabled) {
|
|
37
|
+
LCQSessionReplay.LCQLogsEnabled = isEnabled;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
RCT_EXPORT_METHOD(setUserStepsEnabled:(BOOL)isEnabled) {
|
|
41
|
+
LCQSessionReplay.userStepsEnabled = isEnabled;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
RCT_EXPORT_METHOD(getSessionReplayLink:
|
|
45
|
+
(RCTPromiseResolveBlock) resolve :(RCTPromiseRejectBlock)reject) {
|
|
46
|
+
NSString *link = LCQSessionReplay.sessionReplayLink;
|
|
47
|
+
resolve(link);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
- (NSArray<NSDictionary *> *)getNetworkLogsArray:
|
|
51
|
+
(NSArray<LCQSessionMetadataNetworkLogs *>*) networkLogs {
|
|
52
|
+
NSMutableArray<NSDictionary *> *networkLogsArray = [NSMutableArray array];
|
|
53
|
+
|
|
54
|
+
for (LCQSessionMetadataNetworkLogs* log in networkLogs) {
|
|
55
|
+
NSDictionary *nLog = @{@"url": log.url, @"statusCode": @(log.statusCode), @"duration": @(log.duration)};
|
|
56
|
+
[networkLogsArray addObject:nLog];
|
|
57
|
+
}
|
|
58
|
+
return networkLogsArray;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
- (NSDictionary *)getMetadataObjectMap:(LCQSessionMetadata *)metadataObject {
|
|
62
|
+
return @{
|
|
63
|
+
@"appVersion": metadataObject.appVersion,
|
|
64
|
+
@"OS": metadataObject.os,
|
|
65
|
+
@"device": metadataObject.device,
|
|
66
|
+
@"sessionDurationInSeconds": @(metadataObject.sessionDuration),
|
|
67
|
+
@"hasLinkToAppReview": @(metadataObject.hasLinkToAppReview),
|
|
68
|
+
@"launchType": @(metadataObject.launchType),
|
|
69
|
+
@"launchDuration": @(metadataObject.launchDuration),
|
|
70
|
+
@"bugsCount": @(metadataObject.bugsCount),
|
|
71
|
+
@"fatalCrashCount": @(metadataObject.fatalCrashCount),
|
|
72
|
+
@"oomCrashCount": @(metadataObject.oomCrashCount),
|
|
73
|
+
@"networkLogs":[self getNetworkLogsArray:metadataObject.networkLogs]
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
RCT_EXPORT_METHOD(setSyncCallback) {
|
|
78
|
+
[LCQSessionReplay setSyncCallbackWithHandler:^(LCQSessionMetadata * _Nonnull metadataObject, SessionEvaluationCompletion _Nonnull completion) {
|
|
79
|
+
|
|
80
|
+
[self sendEventWithName:@"LCQSessionReplayOnSyncCallback"
|
|
81
|
+
body:[self getMetadataObjectMap:metadataObject]];
|
|
82
|
+
|
|
83
|
+
self.sessionEvaluationCompletion = completion;
|
|
84
|
+
}];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
RCT_EXPORT_METHOD(evaluateSync:(BOOL)result) {
|
|
88
|
+
|
|
89
|
+
if (self.sessionEvaluationCompletion) {
|
|
90
|
+
|
|
91
|
+
self.sessionEvaluationCompletion(result);
|
|
92
|
+
|
|
93
|
+
self.sessionEvaluationCompletion = nil;
|
|
94
|
+
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@synthesize description;
|
|
100
|
+
|
|
101
|
+
@synthesize hash;
|
|
102
|
+
|
|
103
|
+
@synthesize superclass;
|
|
104
|
+
|
|
105
|
+
@end
|
|
106
|
+
|
|
107
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
//
|
|
2
|
+
// LuciqSurveysBridge.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 LuciqSurveysBridge : RCTEventEmitter <RCTBridgeModule>
|
|
15
|
+
/*
|
|
16
|
+
+------------------------------------------------------------------------+
|
|
17
|
+
| Surveys Module |
|
|
18
|
+
+------------------------------------------------------------------------+
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
- (void)showSurvey:(NSString *)surveyToken;
|
|
22
|
+
|
|
23
|
+
- (void)showSurveysIfAvailable;
|
|
24
|
+
|
|
25
|
+
- (void)setOnShowHandler:(RCTResponseSenderBlock)callBack;
|
|
26
|
+
|
|
27
|
+
- (void)setOnDismissHandler:(RCTResponseSenderBlock)callBack;
|
|
28
|
+
|
|
29
|
+
- (void)setAutoShowingEnabled:(BOOL)autoShowingSurveysEnabled;
|
|
30
|
+
|
|
31
|
+
- (void)setShouldShowWelcomeScreen:(BOOL)shouldShowWelcomeScreen;
|
|
32
|
+
|
|
33
|
+
- (void)hasRespondedToSurvey:(NSString *)surveyToken
|
|
34
|
+
:(RCTPromiseResolveBlock)resolve
|
|
35
|
+
:(RCTPromiseRejectBlock)reject;
|
|
36
|
+
|
|
37
|
+
- (void)getAvailableSurveys:(RCTPromiseResolveBlock)resolve :(RCTPromiseRejectBlock)reject;
|
|
38
|
+
|
|
39
|
+
- (void)setEnabled:(BOOL)surveysEnabled;
|
|
40
|
+
|
|
41
|
+
- (void)setAppStoreURL:(NSString *)appStoreURL;
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@end
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
//
|
|
2
|
+
// LuciqSurveysBridge.m
|
|
3
|
+
// RNLuciq
|
|
4
|
+
//
|
|
5
|
+
// Created by Salma Ali on 7/30/19.
|
|
6
|
+
// Copyright © 2019 luciq. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "LuciqSurveysBridge.h"
|
|
10
|
+
#import <LuciqSDK/LCQSurveys.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 LuciqSurveysBridge
|
|
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
|
+
@"LCQWillShowSurvey",
|
|
31
|
+
@"LCQDidDismissSurvey"
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
RCT_EXPORT_MODULE(LCQSurveys)
|
|
36
|
+
|
|
37
|
+
RCT_EXPORT_METHOD(showSurvey:(NSString *)surveyToken) {
|
|
38
|
+
[LCQSurveys showSurveyWithToken:surveyToken];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
RCT_EXPORT_METHOD(hasRespondedToSurvey:(NSString *)surveyToken :(RCTPromiseResolveBlock)resolve :(RCTPromiseRejectBlock)reject) {
|
|
42
|
+
[LCQSurveys hasRespondedToSurveyWithToken:surveyToken
|
|
43
|
+
completionHandler:^(BOOL hasResponded) {
|
|
44
|
+
resolve(@(hasResponded));
|
|
45
|
+
}];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
RCT_EXPORT_METHOD(getAvailableSurveys:(RCTPromiseResolveBlock)resolve :(RCTPromiseRejectBlock)reject) {
|
|
49
|
+
[LCQSurveys availableSurveysWithCompletionHandler:^(NSArray<LCQSurvey *> *availableSurveys) {
|
|
50
|
+
NSMutableArray<NSDictionary*>* mappedSurveys = [[NSMutableArray alloc] init];
|
|
51
|
+
for (LCQSurvey* survey in availableSurveys) {
|
|
52
|
+
[mappedSurveys addObject:@{@"title": survey.title }];
|
|
53
|
+
}
|
|
54
|
+
resolve(mappedSurveys);
|
|
55
|
+
}];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
RCT_EXPORT_METHOD(setEnabled:(BOOL)surveysEnabled) {
|
|
59
|
+
LCQSurveys.enabled = surveysEnabled;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
RCT_EXPORT_METHOD(showSurveysIfAvailable) {
|
|
63
|
+
[LCQSurveys showSurveyIfAvailable];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
RCT_EXPORT_METHOD(setOnShowHandler:(RCTResponseSenderBlock)callBack) {
|
|
67
|
+
if (callBack != nil) {
|
|
68
|
+
LCQSurveys.willShowSurveyHandler = ^{
|
|
69
|
+
[self sendEventWithName:@"LCQWillShowSurvey" body:nil];
|
|
70
|
+
};
|
|
71
|
+
} else {
|
|
72
|
+
LCQSurveys.willShowSurveyHandler = ^{};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
RCT_EXPORT_METHOD(setOnDismissHandler:(RCTResponseSenderBlock)callBack) {
|
|
77
|
+
if (callBack != nil) {
|
|
78
|
+
LCQSurveys.didDismissSurveyHandler = ^{
|
|
79
|
+
[self sendEventWithName:@"LCQDidDismissSurvey" body:nil];
|
|
80
|
+
};
|
|
81
|
+
} else {
|
|
82
|
+
LCQSurveys.didDismissSurveyHandler = ^{};
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
RCT_EXPORT_METHOD(setAutoShowingEnabled:(BOOL)autoShowingSurveysEnabled) {
|
|
87
|
+
LCQSurveys.autoShowingEnabled = autoShowingSurveysEnabled;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
RCT_EXPORT_METHOD(setShouldShowWelcomeScreen:(BOOL)shouldShowWelcomeScreen) {
|
|
91
|
+
LCQSurveys.shouldShowWelcomeScreen = shouldShowWelcomeScreen;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
RCT_EXPORT_METHOD(setAppStoreURL:(NSString *)appStoreURL) {
|
|
95
|
+
LCQSurveys.appStoreURL = appStoreURL;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@synthesize description;
|
|
99
|
+
|
|
100
|
+
@synthesize hash;
|
|
101
|
+
|
|
102
|
+
@synthesize superclass;
|
|
103
|
+
|
|
104
|
+
@end
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RCTConvert+LuciqEnums.h
|
|
3
|
+
// luciqDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by Yousef Hamza on 9/29/16.
|
|
6
|
+
// Copyright © 2016 Facebook. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
#if __has_include("React/RCTConvert.h")
|
|
9
|
+
#import <React/RCTConvert.h>
|
|
10
|
+
#else
|
|
11
|
+
#import "RCTConvert.h"
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
#import "ArgsRegistry.h"
|
|
15
|
+
|
|
16
|
+
@interface RCTConvert (LuciqEnums)
|
|
17
|
+
|
|
18
|
+
@end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
//
|
|
2
|
+
// RCTConvert+LuciqEnums.m
|
|
3
|
+
// luciqDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by Yousef Hamza on 9/29/16.
|
|
6
|
+
// Copyright © 2016 Facebook. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#import "RCTConvert+LuciqEnums.h"
|
|
10
|
+
#import <LuciqSDK/LCQTypes.h>
|
|
11
|
+
|
|
12
|
+
@implementation RCTConvert (LuciqEnums)
|
|
13
|
+
|
|
14
|
+
RCT_ENUM_CONVERTER(
|
|
15
|
+
LCQSDKDebugLogsLevel,
|
|
16
|
+
ArgsRegistry.sdkLogLevels,
|
|
17
|
+
LCQSDKDebugLogsLevelError,
|
|
18
|
+
integerValue
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
RCT_ENUM_CONVERTER(
|
|
22
|
+
LCQInvocationEvent,
|
|
23
|
+
ArgsRegistry.invocationEvents,
|
|
24
|
+
LCQInvocationEventNone,
|
|
25
|
+
integerValue
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
RCT_ENUM_CONVERTER(
|
|
29
|
+
LCQBugReportingOption,
|
|
30
|
+
ArgsRegistry.invocationOptions,
|
|
31
|
+
LCQBugReportingOptionNone,
|
|
32
|
+
integerValue
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
RCT_ENUM_CONVERTER(
|
|
36
|
+
LCQColorTheme,
|
|
37
|
+
ArgsRegistry.colorThemes,
|
|
38
|
+
LCQColorThemeLight,
|
|
39
|
+
integerValue
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
RCT_ENUM_CONVERTER(
|
|
43
|
+
CGRectEdge,
|
|
44
|
+
ArgsRegistry.floatingButtonEdges,
|
|
45
|
+
CGRectMinXEdge,
|
|
46
|
+
unsignedIntegerValue
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
RCT_ENUM_CONVERTER(
|
|
50
|
+
LCQPosition,
|
|
51
|
+
ArgsRegistry.recordButtonPositions,
|
|
52
|
+
LCQPositionBottomRight,
|
|
53
|
+
integerValue
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
RCT_ENUM_CONVERTER(
|
|
57
|
+
LCQWelcomeMessageMode,
|
|
58
|
+
ArgsRegistry.welcomeMessageStates,
|
|
59
|
+
LCQWelcomeMessageModeLive,
|
|
60
|
+
integerValue
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
RCT_ENUM_CONVERTER(
|
|
64
|
+
LCQBugReportingReportType,
|
|
65
|
+
ArgsRegistry.reportTypes,
|
|
66
|
+
LCQBugReportingReportTypeBug,
|
|
67
|
+
integerValue
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
RCT_ENUM_CONVERTER(
|
|
71
|
+
LCQDismissType,
|
|
72
|
+
ArgsRegistry.dismissTypes,
|
|
73
|
+
LCQDismissTypeSubmit,
|
|
74
|
+
integerValue
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
RCT_ENUM_CONVERTER(
|
|
78
|
+
LCQAction,
|
|
79
|
+
ArgsRegistry.actionTypes,
|
|
80
|
+
LCQActionAllActions,
|
|
81
|
+
integerValue
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
RCT_ENUM_CONVERTER(
|
|
85
|
+
LCQExtendedBugReportMode,
|
|
86
|
+
ArgsRegistry.extendedBugReportStates,
|
|
87
|
+
LCQExtendedBugReportModeDisabled,
|
|
88
|
+
integerValue
|
|
89
|
+
);
|
|
90
|
+
|
|
91
|
+
RCT_ENUM_CONVERTER(
|
|
92
|
+
LCQUserStepsMode,
|
|
93
|
+
ArgsRegistry.reproStates,
|
|
94
|
+
LCQUserStepsModeEnabledWithNoScreenshots,
|
|
95
|
+
integerValue
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
RCT_ENUM_CONVERTER(
|
|
99
|
+
LCQLocale,
|
|
100
|
+
ArgsRegistry.locales,
|
|
101
|
+
LCQLocaleEnglish,
|
|
102
|
+
integerValue
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
RCT_ENUM_CONVERTER(
|
|
106
|
+
LCQNonFatalLevel,
|
|
107
|
+
ArgsRegistry.nonFatalExceptionLevel,
|
|
108
|
+
LCQNonFatalLevelError,
|
|
109
|
+
integerValue
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
RCT_ENUM_CONVERTER(
|
|
113
|
+
LCQAutoMaskScreenshotOption,
|
|
114
|
+
ArgsRegistry.autoMaskingTypes,
|
|
115
|
+
LCQAutoMaskScreenshotOptionMaskNothing,
|
|
116
|
+
integerValue
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
RCT_ENUM_CONVERTER(
|
|
120
|
+
LCQConsentAction,
|
|
121
|
+
ArgsRegistry.userConsentActionTypes,
|
|
122
|
+
LCQConsentActionNoChat,
|
|
123
|
+
integerValue
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
@end
|
|
127
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#ifndef RNLuciq_h
|
|
2
|
+
#define RNLuciq_h
|
|
3
|
+
|
|
4
|
+
#import <LuciqSDK/LuciqSDK.h>
|
|
5
|
+
#import "ArgsRegistry.h"
|
|
6
|
+
|
|
7
|
+
@interface RNLuciq : NSObject
|
|
8
|
+
|
|
9
|
+
+ (void)initWithToken:(NSString *)token invocationEvents:(LCQInvocationEvent)invocationEvents debugLogsLevel:(LCQSDKDebugLogsLevel)debugLogsLevel;
|
|
10
|
+
|
|
11
|
+
+ (void)initWithToken:(NSString *)token invocationEvents:(LCQInvocationEvent)invocationEvents debugLogsLevel:(LCQSDKDebugLogsLevel)debugLogsLevel
|
|
12
|
+
useNativeNetworkInterception:(BOOL)useNativeNetworkInterception;
|
|
13
|
+
|
|
14
|
+
+ (void)initWithToken:(NSString *)token
|
|
15
|
+
invocationEvents:(LCQInvocationEvent)invocationEvents
|
|
16
|
+
useNativeNetworkInterception:(BOOL)useNativeNetworkInterception;
|
|
17
|
+
|
|
18
|
+
+ (void)initWithToken:(NSString *)token invocationEvents:(LCQInvocationEvent)invocationEvents;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
@brief Set codePush version before starting the SDK.
|
|
22
|
+
|
|
23
|
+
@discussion Sets Code Push version to be used for all reports.
|
|
24
|
+
should be called from `-[UIApplicationDelegate application:didFinishLaunchingWithOptions:]`
|
|
25
|
+
and before `startWithToken`.
|
|
26
|
+
|
|
27
|
+
@param codePushVersion the Code Push version to be used for all reports.
|
|
28
|
+
*/
|
|
29
|
+
+ (void)setCodePushVersion:(NSString *)codePushVersion;
|
|
30
|
+
|
|
31
|
+
+ (void)setOverAirVersion:(NSDictionary *)overAirVersion;
|
|
32
|
+
|
|
33
|
+
@end
|
|
34
|
+
|
|
35
|
+
#endif /* RNLuciq_h */
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
#import <LuciqSDK/LuciqSDK.h>
|
|
2
|
+
#import <React/RCTLog.h>
|
|
3
|
+
#import "RNLuciq.h"
|
|
4
|
+
#import "Util/LCQNetworkLogger+CP.h"
|
|
5
|
+
#import "Util/Luciq+CP.h"
|
|
6
|
+
|
|
7
|
+
@implementation RNLuciq
|
|
8
|
+
|
|
9
|
+
static BOOL didInit = NO;
|
|
10
|
+
|
|
11
|
+
/// Resets `didInit` allowing re-initialization, it should not be added to the header file and is there for testing purposes.
|
|
12
|
+
+ (void)reset {
|
|
13
|
+
didInit = NO;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
+ (void)initWithToken:(NSString *)token
|
|
17
|
+
invocationEvents:(LCQInvocationEvent)invocationEvents
|
|
18
|
+
useNativeNetworkInterception:(BOOL)useNativeNetworkInterception {
|
|
19
|
+
|
|
20
|
+
didInit = YES;
|
|
21
|
+
|
|
22
|
+
[Luciq setCurrentPlatform:LCQPlatformReactNative];
|
|
23
|
+
|
|
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
|
+
[LCQNetworkLogger disableAutomaticCapturingOfNetworkLogs];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[Luciq startWithToken:token invocationEvents:invocationEvents];
|
|
31
|
+
|
|
32
|
+
// Setup automatic capturing of JavaScript console logs
|
|
33
|
+
RCTAddLogFunction(LuciqReactLogFunction);
|
|
34
|
+
RCTSetLogThreshold(RCTLogLevelInfo);
|
|
35
|
+
|
|
36
|
+
// Even though automatic network logging is disabled in the iOS SDK, the network logger itself
|
|
37
|
+
// is still needed since network logs captured by the React Native SDK need to be logged through it
|
|
38
|
+
LCQNetworkLogger.enabled = YES;
|
|
39
|
+
|
|
40
|
+
// Temporarily disabling APM hot launches
|
|
41
|
+
LCQAPM.hotAppLaunchEnabled = NO;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
+ (void)initWithToken:(NSString *)token invocationEvents:(LCQInvocationEvent)invocationEvents {
|
|
45
|
+
[self initWithToken:token invocationEvents:invocationEvents useNativeNetworkInterception:NO];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
+ (void)initWithToken:(NSString *)token invocationEvents:(LCQInvocationEvent)invocationEvents debugLogsLevel:(LCQSDKDebugLogsLevel)debugLogsLevel useNativeNetworkInterception:(BOOL)useNativeNetworkInterception {
|
|
49
|
+
[Luciq setSdkDebugLogsLevel:debugLogsLevel];
|
|
50
|
+
[self initWithToken:token invocationEvents:invocationEvents useNativeNetworkInterception:useNativeNetworkInterception];
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
+ (void)initWithToken:(NSString *)token
|
|
54
|
+
invocationEvents:(LCQInvocationEvent)invocationEvents
|
|
55
|
+
debugLogsLevel:(LCQSDKDebugLogsLevel)debugLogsLevel {
|
|
56
|
+
[Luciq setSdkDebugLogsLevel:debugLogsLevel];
|
|
57
|
+
[self initWithToken:token invocationEvents:invocationEvents];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
+ (void)setCodePushVersion:(NSString *)codePushVersion {
|
|
61
|
+
[Luciq setCodePushVersion:codePushVersion];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
+ (void)setOverAirVersion:(NSDictionary *)overAirVersion {
|
|
65
|
+
[Luciq setOverAirVersion:overAirVersion[@"version"] withType:[overAirVersion[@"service"] intValue]];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
// Note: This function is used to bridge LCQNSLog with RCTLogFunction.
|
|
70
|
+
// This log function should not be used externally and is only an implementation detail.
|
|
71
|
+
void RNLCQLog(LCQLogLevel logLevel, NSString *format, ...) {
|
|
72
|
+
va_list arg_list;
|
|
73
|
+
va_start(arg_list, format);
|
|
74
|
+
LCQNSLogWithLevel(format, arg_list, logLevel);
|
|
75
|
+
va_end(arg_list);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
RCTLogFunction LuciqReactLogFunction = ^(RCTLogLevel level,
|
|
79
|
+
__unused RCTLogSource source,
|
|
80
|
+
NSString *fileName,
|
|
81
|
+
NSNumber *lineNumber,
|
|
82
|
+
NSString *message)
|
|
83
|
+
{
|
|
84
|
+
NSString *formatString = @"Luciq - REACT LOG: %@";
|
|
85
|
+
NSString *log = RCTFormatLog([NSDate date], level, fileName, lineNumber, message);
|
|
86
|
+
|
|
87
|
+
switch(level) {
|
|
88
|
+
case RCTLogLevelTrace:
|
|
89
|
+
RNLCQLog(LCQLogLevelVerbose, formatString, log);
|
|
90
|
+
break;
|
|
91
|
+
case RCTLogLevelInfo:
|
|
92
|
+
RNLCQLog(LCQLogLevelInfo, formatString, log);
|
|
93
|
+
break;
|
|
94
|
+
case RCTLogLevelWarning:
|
|
95
|
+
RNLCQLog(LCQLogLevelWarning, formatString, log);
|
|
96
|
+
break;
|
|
97
|
+
case RCTLogLevelError:
|
|
98
|
+
RNLCQLog(LCQLogLevelError, formatString, log);
|
|
99
|
+
break;
|
|
100
|
+
case RCTLogLevelFatal:
|
|
101
|
+
RNLCQLog(LCQLogLevelError, formatString, log);
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
@end
|
|
107
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#import <LuciqSDK/LuciqSDK.h>
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@interface LCQCrashReporting (CP)
|
|
5
|
+
|
|
6
|
+
+ (void)cp_reportFatalCrashWithStackTrace:(NSDictionary*)stackTrace;
|
|
7
|
+
|
|
8
|
+
+ (void)cp_reportNonFatalCrashWithStackTrace:(NSDictionary*)stackTrace
|
|
9
|
+
level:(LCQNonFatalLevel)level
|
|
10
|
+
groupingString:(NSString *)groupingString
|
|
11
|
+
userAttributes:(NSDictionary<NSString *, NSString*> *)userAttributes;
|
|
12
|
+
@end
|
|
13
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#import <LuciqSDK/LuciqSDK.h>
|
|
2
|
+
|
|
3
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
4
|
+
|
|
5
|
+
@interface LCQNetworkLogger (CP)
|
|
6
|
+
|
|
7
|
+
@property (class, atomic, assign) BOOL w3ExternalTraceIDEnabled;
|
|
8
|
+
@property (class, atomic, assign) BOOL w3ExternalGeneratedHeaderEnabled;
|
|
9
|
+
@property (class, atomic, assign) BOOL w3CaughtHeaderEnabled;
|
|
10
|
+
|
|
11
|
+
@property (class, atomic, assign) BOOL isNativeNetworkInterceptionFeatureEnabled;
|
|
12
|
+
|
|
13
|
+
+ (void)disableAutomaticCapturingOfNetworkLogs;
|
|
14
|
+
+ (void)addNetworkLogWithUrl:(NSString *_Nonnull)url
|
|
15
|
+
method:(NSString *_Nonnull)method
|
|
16
|
+
requestBody:(NSString *_Nonnull)request
|
|
17
|
+
requestBodySize:(int64_t)requestBodySize
|
|
18
|
+
responseBody:(NSString *_Nonnull)response
|
|
19
|
+
responseBodySize:(int64_t)responseBodySize
|
|
20
|
+
responseCode:(int32_t)code
|
|
21
|
+
requestHeaders:(NSDictionary *_Nonnull)requestHeaders
|
|
22
|
+
responseHeaders:(NSDictionary *_Nonnull)responseHeaders
|
|
23
|
+
contentType:(NSString *_Nonnull)contentType
|
|
24
|
+
errorDomain:(NSString *_Nullable)errorDomain
|
|
25
|
+
errorCode:(int32_t)errorCode
|
|
26
|
+
startTime:(int64_t)startTime
|
|
27
|
+
duration:(int64_t) duration
|
|
28
|
+
gqlQueryName:(NSString * _Nullable)gqlQueryName
|
|
29
|
+
serverErrorMessage:(NSString * _Nullable)serverErrorMessage
|
|
30
|
+
isW3cCaughted:(NSNumber * _Nullable)isW3cCaughted
|
|
31
|
+
partialID:(NSNumber * _Nullable)partialID
|
|
32
|
+
timestamp:(NSNumber * _Nullable)timestamp
|
|
33
|
+
generatedW3CTraceparent:(NSString * _Nullable)generatedW3CTraceparent
|
|
34
|
+
caughtedW3CTraceparent:(NSString * _Nullable)caughtedW3CTraceparent;
|
|
35
|
+
|
|
36
|
+
+ (void)addNetworkLogWithUrl:(NSString *)url
|
|
37
|
+
method:(NSString *)method
|
|
38
|
+
requestBody:(NSString *)request
|
|
39
|
+
requestBodySize:(int64_t)requestBodySize
|
|
40
|
+
responseBody:(NSString *)response
|
|
41
|
+
responseBodySize:(int64_t)responseBodySize
|
|
42
|
+
responseCode:(int32_t)code
|
|
43
|
+
requestHeaders:(NSDictionary *)requestHeaders
|
|
44
|
+
responseHeaders:(NSDictionary *)responseHeaders
|
|
45
|
+
contentType:(NSString *)contentType
|
|
46
|
+
errorDomain:(NSString *)errorDomain
|
|
47
|
+
errorCode:(int32_t)errorCode
|
|
48
|
+
startTime:(int64_t)startTime
|
|
49
|
+
duration:(int64_t) duration
|
|
50
|
+
gqlQueryName:(NSString * _Nullable)gqlQueryName
|
|
51
|
+
serverErrorMessage:(NSString * _Nullable)serverErrorMessage
|
|
52
|
+
isW3cCaughted:(NSNumber * _Nullable)isW3cCaughted
|
|
53
|
+
partialID:(NSNumber * _Nullable)partialID
|
|
54
|
+
timestamp:(NSNumber * _Nullable)timestamp
|
|
55
|
+
generatedW3CTraceparent:(NSString * _Nullable)generatedW3CTraceparent
|
|
56
|
+
caughtedW3CTraceparent:(NSString * _Nullable)caughtedW3CTraceparent;
|
|
57
|
+
|
|
58
|
+
+ (void)forceStartNetworkLogging;
|
|
59
|
+
+ (void)forceStopNetworkLogging;
|
|
60
|
+
|
|
61
|
+
+ (void)setCPRequestAsyncObfuscationHandler:(void (^)(NSURLRequest * requestToBeObfuscated, void (^ completion)(NSURLRequest * obfuscatedRequest)))asyncObfuscationHandler;
|
|
62
|
+
+ (void)setCPRequestFilteringHandler:(void (^)(NSURLRequest * request, void (^completion)(BOOL keep)))requestFilteringHandler;
|
|
63
|
+
+ (void)setCPResponseFilteringHandler:(void (^)(NSURLResponse * response, void (^comppletion)(BOOL keep)))responseFilteringHandler;
|
|
64
|
+
+ (double)getNetworkBodyMaxSize;
|
|
65
|
+
|
|
66
|
+
@end
|
|
67
|
+
|
|
68
|
+
NS_ASSUME_NONNULL_END
|