jcore-react-native 2.2.9 → 2.3.1
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/android/libs/jcore-android-5.1.0.jar +0 -0
- package/android/src/main/java/cn/jiguang/plugins/core/JCoreModule.java +27 -0
- package/index.d.ts +14 -0
- package/index.js +12 -0
- package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/ios-arm64/libJCore.a +0 -0
- package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/ios-arm64_x86_64-simulator/libJCore.a +0 -0
- package/ios/RCTJCoreModule.xcodeproj/project.pbxproj +5 -5
- package/package.json +1 -1
- package/android/libs/jcore-android-5.0.0.jar +0 -0
- /package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/Info.plist +0 -0
- /package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/ios-arm64/Headers/JGCOREAPI.h +0 -0
- /package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/ios-arm64/Headers/JGInforCollectionAuth.h +0 -0
- /package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/ios-arm64/PrivacyInfo.xcprivacy +0 -0
- /package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/ios-arm64_x86_64-simulator/Headers/JGCOREAPI.h +0 -0
- /package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/ios-arm64_x86_64-simulator/Headers/JGInforCollectionAuth.h +0 -0
- /package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/ios-arm64_x86_64-simulator/PrivacyInfo.xcprivacy +0 -0
|
Binary file
|
|
@@ -58,5 +58,32 @@ public class JCoreModule extends ReactContextBaseJavaModule {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
@ReactMethod
|
|
62
|
+
public void enableSDKLocalLog(ReadableMap readableMap){
|
|
63
|
+
if (readableMap == null) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
boolean enable = false;
|
|
67
|
+
if (readableMap.hasKey("enable")) {
|
|
68
|
+
enable = readableMap.getBoolean("enable");
|
|
69
|
+
}
|
|
70
|
+
boolean uploadJgToServer = false;
|
|
71
|
+
if (readableMap.hasKey("uploadJgToServer")) {
|
|
72
|
+
uploadJgToServer = readableMap.getBoolean("uploadJgToServer");
|
|
73
|
+
}
|
|
74
|
+
JCoreInterface.enableSDKLocalLog(reactContext,enable,uploadJgToServer);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@ReactMethod
|
|
78
|
+
public void readNewLogs(Callback callback) {
|
|
79
|
+
if (callback == null) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
String logs = JCoreInterface.readNewLogs(reactContext);
|
|
83
|
+
WritableMap writableMap = Arguments.createMap();
|
|
84
|
+
writableMap.putString("logs", logs);
|
|
85
|
+
callback.invoke(writableMap);
|
|
86
|
+
}
|
|
87
|
+
|
|
61
88
|
|
|
62
89
|
}
|
package/index.d.ts
CHANGED
|
@@ -17,4 +17,18 @@ export default class JCore {
|
|
|
17
17
|
* @param enable 是否启用自动唤醒
|
|
18
18
|
*/
|
|
19
19
|
static enableAutoWakeup(enable: boolean): void;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 启用SDK本地日志,启动用SDK日志缓存本设备
|
|
23
|
+
* @param enable 是否启用日志(true表示启用,false表示禁用)
|
|
24
|
+
* @param uploadJgToServer 是否将日志上传到极光服务器(true表示上传,false表示不上传)
|
|
25
|
+
*/
|
|
26
|
+
static enableSDKLocalLog(params: {enable: boolean, uploadJgToServer: boolean}): void;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 获取所有进程的新增SDK日志
|
|
30
|
+
*
|
|
31
|
+
* @param {Function} callback = (result) => {"logs":String}
|
|
32
|
+
*/
|
|
33
|
+
static readNewLogs(callback: Callback<{ logs: string }>): void;
|
|
20
34
|
}
|
package/index.js
CHANGED
|
@@ -23,4 +23,16 @@ export default class JCore {
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
static enableSDKLocalLog(params) {
|
|
27
|
+
if (Platform.OS == "android") {
|
|
28
|
+
JCoreModule.enableSDKLocalLog(params)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static readNewLogs(callback) {
|
|
33
|
+
if (Platform.OS == "android") {
|
|
34
|
+
JCoreModule.readNewLogs(callback)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
26
38
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
archiveVersion = 1;
|
|
4
4
|
classes = {
|
|
5
5
|
};
|
|
6
|
-
objectVersion =
|
|
6
|
+
objectVersion = 52;
|
|
7
7
|
objects = {
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
10
|
08166A7B27EC622A00C7233B /* RCTJCoreModule.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6212E9EF1F3991D500BDF51A /* RCTJCoreModule.h */; };
|
|
11
11
|
6212E9F11F3991D500BDF51A /* RCTJCoreModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 6212E9F01F3991D500BDF51A /* RCTJCoreModule.m */; };
|
|
12
|
-
|
|
12
|
+
A4358E9E2E2F654F0050EB84 /* jcore-ios-5.1.0.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A4358E9D2E2F654F0050EB84 /* jcore-ios-5.1.0.xcframework */; };
|
|
13
13
|
/* End PBXBuildFile section */
|
|
14
14
|
|
|
15
15
|
/* Begin PBXCopyFilesBuildPhase section */
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
6212E9B41F3990DC00BDF51A /* libRCTJCoreModule.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRCTJCoreModule.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
30
30
|
6212E9EF1F3991D500BDF51A /* RCTJCoreModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTJCoreModule.h; sourceTree = "<group>"; };
|
|
31
31
|
6212E9F01F3991D500BDF51A /* RCTJCoreModule.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTJCoreModule.m; sourceTree = "<group>"; };
|
|
32
|
-
|
|
32
|
+
A4358E9D2E2F654F0050EB84 /* jcore-ios-5.1.0.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = "jcore-ios-5.1.0.xcframework"; path = "RCTJCoreModule/jcore-ios-5.1.0.xcframework"; sourceTree = "<group>"; };
|
|
33
33
|
/* End PBXFileReference section */
|
|
34
34
|
|
|
35
35
|
/* Begin PBXFrameworksBuildPhase section */
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
isa = PBXFrameworksBuildPhase;
|
|
38
38
|
buildActionMask = 2147483647;
|
|
39
39
|
files = (
|
|
40
|
-
|
|
40
|
+
A4358E9E2E2F654F0050EB84 /* jcore-ios-5.1.0.xcframework in Frameworks */,
|
|
41
41
|
);
|
|
42
42
|
runOnlyForDeploymentPostprocessing = 0;
|
|
43
43
|
};
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
5CE8168A22FC0295007D710C /* Frameworks */ = {
|
|
48
48
|
isa = PBXGroup;
|
|
49
49
|
children = (
|
|
50
|
-
|
|
50
|
+
A4358E9D2E2F654F0050EB84 /* jcore-ios-5.1.0.xcframework */,
|
|
51
51
|
);
|
|
52
52
|
name = Frameworks;
|
|
53
53
|
sourceTree = "<group>";
|
package/package.json
CHANGED
|
Binary file
|
/package/ios/RCTJCoreModule/{jcore-ios-5.0.1.xcframework → jcore-ios-5.1.0.xcframework}/Info.plist
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|