shakebug-react-native 2.4.10 → 2.4.11
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/package.json +1 -1
- package/src/APIs/AddIssue.js +7 -5
- package/src/APIs/AddReview.js +5 -2
- package/src/APIs/CustomUserId.js +5 -2
- package/src/APIs/EndSession.js +3 -2
- package/src/APIs/Event.js +5 -2
- package/src/APIs/FetchRemoteCodeAPI.js +5 -2
- package/src/APIs/MatchKey.js +3 -2
- package/src/APIs/StartSession.js +44 -23
- package/src/Componanats/ShakeFunction.js +30 -4
- package/src/Screens/Shakebug.js +11 -6
- package/src/index.tsx +3 -2
- package/Volumes:.fileloc +0 -8
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shakebug-react-native",
|
|
3
3
|
"title": "shakebug-react-native",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.11",
|
|
5
5
|
"description": "Shakebug allows users to report the bug from your mobile phone for your application. Here users just need to shake their mobile and all the data regarding bugs & crashes can be seen by developers through their log in panel easily",
|
|
6
6
|
"main": "src/index.tsx",
|
|
7
7
|
"types": "src/index.tsx",
|
package/src/APIs/AddIssue.js
CHANGED
|
@@ -2,10 +2,11 @@ import { NativeModules, Platform } from "react-native";
|
|
|
2
2
|
import DeviceInfo from "../../DeviceInfo";
|
|
3
3
|
import NetInfo from "../../NetInfo/src";
|
|
4
4
|
|
|
5
|
-
const BASE_URL = global.ShakebugSDKEndPointURL;
|
|
6
|
-
const API_KEY = global.ShakebugSDKEndPointURLheaderKey;
|
|
7
5
|
|
|
8
6
|
async function AddIssueApi(session_id, application_id, path, isVideo, desc, email) {
|
|
7
|
+
const BASE_URL = global.ShakebugSDKEndPointURL || "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
8
|
+
const API_KEY = global.ShakebugSDKEndPointURLheaderKey || "MarchShake2022";
|
|
9
|
+
|
|
9
10
|
try {
|
|
10
11
|
|
|
11
12
|
const { ShakebugSDKSharedPreferencesModule } = NativeModules;
|
|
@@ -30,7 +31,7 @@ async function AddIssueApi(session_id, application_id, path, isVideo, desc, emai
|
|
|
30
31
|
let totalMemory = await DeviceInfo.getTotalMemory();
|
|
31
32
|
let usedMemory = await DeviceInfo.getUsedMemory();
|
|
32
33
|
let memoryInBytes = totalMemory - usedMemory;
|
|
33
|
-
|
|
34
|
+
|
|
34
35
|
let memory = "";
|
|
35
36
|
if (memoryInBytes >= 1024 * 1024 * 1024) {
|
|
36
37
|
memory = (memoryInBytes / (1024 * 1024 * 1024)).toFixed(2) + " GB";
|
|
@@ -50,7 +51,7 @@ async function AddIssueApi(session_id, application_id, path, isVideo, desc, emai
|
|
|
50
51
|
formData.append("applicationsid", application_id);
|
|
51
52
|
formData.append("session_id", session_id);
|
|
52
53
|
formData.append("batteryLevel", batteryLevel);
|
|
53
|
-
formData.append("image", {uri: media, name: name, type: type});
|
|
54
|
+
formData.append("image", { uri: media, name: name, type: type });
|
|
54
55
|
formData.append("memory", memory);
|
|
55
56
|
formData.append("email", email);
|
|
56
57
|
formData.append("devicemodel", `${architecture[0]} -- ${model}`);
|
|
@@ -63,7 +64,8 @@ async function AddIssueApi(session_id, application_id, path, isVideo, desc, emai
|
|
|
63
64
|
formData.append("custom_user_id", Custom_User_Id || "")
|
|
64
65
|
formData.append("sdk_version", global.sdk_version)
|
|
65
66
|
formData.append("platform", Platform.OS)
|
|
66
|
-
|
|
67
|
+
formData.append("sdk_platform", global.sdk_platform)
|
|
68
|
+
formData.append("sdk_platform_version", global.sdk_platform_version)
|
|
67
69
|
|
|
68
70
|
const response = await fetch(BASE_URL, {
|
|
69
71
|
method: 'POST',
|
package/src/APIs/AddReview.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { NativeModules } from "react-native";
|
|
2
2
|
|
|
3
|
-
const BASE_URL = global.ShakebugSDKEndPointURL;
|
|
4
|
-
const API_KEY = global.ShakebugSDKEndPointURLheaderKey;
|
|
5
3
|
|
|
6
4
|
async function AddReviewApi(rating, review, applicationsid, session_id) {
|
|
5
|
+
const BASE_URL = global.ShakebugSDKEndPointURL || "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
6
|
+
const API_KEY = global.ShakebugSDKEndPointURLheaderKey || "MarchShake2022";
|
|
7
|
+
|
|
7
8
|
|
|
8
9
|
const { ShakebugSDKSharedPreferencesModule } = NativeModules;
|
|
9
10
|
|
|
@@ -18,6 +19,8 @@ async function AddReviewApi(rating, review, applicationsid, session_id) {
|
|
|
18
19
|
formData.append("session_id", session_id);
|
|
19
20
|
formData.append("appVersion", global.sdk_version);
|
|
20
21
|
formData.append("custom_user_id", Custom_User_Id || "");
|
|
22
|
+
formData.append("sdk_platform", global.sdk_platform)
|
|
23
|
+
formData.append("sdk_platform_version", global.sdk_platform_version)
|
|
21
24
|
|
|
22
25
|
const response = await fetch(BASE_URL, {
|
|
23
26
|
method: 'POST',
|
package/src/APIs/CustomUserId.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { NativeModules } from "react-native";
|
|
2
2
|
|
|
3
|
-
const BASE_URL = global.ShakebugSDKEndPointURL;
|
|
4
|
-
const API_KEY = global.ShakebugSDKEndPointURLheaderKey;
|
|
5
3
|
|
|
6
4
|
async function CustomUserIdApi(id, name, email, country, other, applicationsid) {
|
|
5
|
+
const BASE_URL = global.ShakebugSDKEndPointURL || "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
6
|
+
const API_KEY = global.ShakebugSDKEndPointURLheaderKey || "MarchShake2022";
|
|
7
|
+
|
|
7
8
|
|
|
8
9
|
const { ShakebugSDKSharedPreferencesModule } = NativeModules;
|
|
9
10
|
|
|
@@ -19,6 +20,8 @@ async function CustomUserIdApi(id, name, email, country, other, applicationsid)
|
|
|
19
20
|
formData.append("country", country?.trim());
|
|
20
21
|
formData.append("other", other);
|
|
21
22
|
formData.append("applicationsid", applicationsid);
|
|
23
|
+
formData.append("sdk_platform", global.sdk_platform)
|
|
24
|
+
formData.append("sdk_platform_version", global.sdk_platform_version)
|
|
22
25
|
|
|
23
26
|
const response = await fetch(BASE_URL, {
|
|
24
27
|
method: 'POST',
|
package/src/APIs/EndSession.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const BASE_URL = global.ShakebugSDKEndPointURL;
|
|
2
|
-
const API_KEY = global.ShakebugSDKEndPointURLheaderKey;
|
|
3
1
|
|
|
4
2
|
async function SessionEndApi(session_id) {
|
|
3
|
+
const BASE_URL = global.ShakebugSDKEndPointURL || "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
4
|
+
const API_KEY = global.ShakebugSDKEndPointURLheaderKey || "MarchShake2022";
|
|
5
|
+
|
|
5
6
|
try {
|
|
6
7
|
|
|
7
8
|
const formData = new FormData();
|
package/src/APIs/Event.js
CHANGED
|
@@ -2,10 +2,11 @@ import { NativeModules } from "react-native";
|
|
|
2
2
|
import DeviceInfo from "../../DeviceInfo";
|
|
3
3
|
import NetInfo from "../../NetInfo/src";
|
|
4
4
|
|
|
5
|
-
const BASE_URL = global.ShakebugSDKEndPointURL;
|
|
6
|
-
const API_KEY = global.ShakebugSDKEndPointURLheaderKey;
|
|
7
5
|
|
|
8
6
|
async function EventApi(application_id, name, value, session_id) {
|
|
7
|
+
const BASE_URL = global.ShakebugSDKEndPointURL || "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
8
|
+
const API_KEY = global.ShakebugSDKEndPointURLheaderKey || "MarchShake2022";
|
|
9
|
+
|
|
9
10
|
try {
|
|
10
11
|
|
|
11
12
|
const { ShakebugSDKSharedPreferencesModule } = NativeModules;
|
|
@@ -20,6 +21,8 @@ async function EventApi(application_id, name, value, session_id) {
|
|
|
20
21
|
formData.append("session_id", session_id);
|
|
21
22
|
formData.append("custom_user_id", Custom_User_Id || "")
|
|
22
23
|
formData.append("sdk_version", global.sdk_version)
|
|
24
|
+
formData.append("sdk_platform", global.sdk_platform)
|
|
25
|
+
formData.append("sdk_platform_version", global.sdk_platform_version)
|
|
23
26
|
|
|
24
27
|
const response = await fetch(BASE_URL, {
|
|
25
28
|
method: 'POST',
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { NativeModules } from "react-native";
|
|
2
2
|
import DeviceInfo from "../../DeviceInfo";
|
|
3
3
|
|
|
4
|
-
const BASE_URL = global.ShakebugSDKEndPointURL;
|
|
5
|
-
const API_KEY = global.ShakebugSDKEndPointURLheaderKey;
|
|
6
4
|
|
|
7
5
|
async function FetchRemoteCodeAPI(config_key, applicationsid, session_id) {
|
|
6
|
+
const BASE_URL = global.ShakebugSDKEndPointURL || "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
7
|
+
const API_KEY = global.ShakebugSDKEndPointURLheaderKey || "MarchShake2022";
|
|
8
|
+
|
|
8
9
|
|
|
9
10
|
try {
|
|
10
11
|
const { ShakebugSDKSharedPreferencesModule } = NativeModules;
|
|
@@ -20,6 +21,8 @@ async function FetchRemoteCodeAPI(config_key, applicationsid, session_id) {
|
|
|
20
21
|
formData.append("appVersion", DeviceInfo?.getVersion());
|
|
21
22
|
formData.append("session_id", session_id);
|
|
22
23
|
formData.append("custom_user_id", Custom_User_Id || "");
|
|
24
|
+
formData.append("sdk_platform", global.sdk_platform)
|
|
25
|
+
formData.append("sdk_platform_version", global.sdk_platform_version)
|
|
23
26
|
|
|
24
27
|
const response = await fetch(BASE_URL, {
|
|
25
28
|
method: "POST",
|
package/src/APIs/MatchKey.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
const BASE_URL = global.ShakebugSDKEndPointURL;
|
|
2
|
-
const API_KEY = global.ShakebugSDKEndPointURLheaderKey;
|
|
3
1
|
|
|
4
2
|
async function MatchKeyApi(appkey, BundleId) {
|
|
3
|
+
const BASE_URL = global.ShakebugSDKEndPointURL || "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
4
|
+
const API_KEY = global.ShakebugSDKEndPointURLheaderKey || "MarchShake2022";
|
|
5
|
+
|
|
5
6
|
|
|
6
7
|
const formData = new FormData();
|
|
7
8
|
formData.append("method", "matchKeys")
|
package/src/APIs/StartSession.js
CHANGED
|
@@ -2,10 +2,10 @@ import { NativeModules } from "react-native";
|
|
|
2
2
|
import DeviceInfo from "../../DeviceInfo";
|
|
3
3
|
import { getLocales } from "../../GetLocals/src";
|
|
4
4
|
|
|
5
|
-
const BASE_URL = global.ShakebugSDKEndPointURL;
|
|
6
|
-
const API_KEY = global.ShakebugSDKEndPointURLheaderKey;
|
|
7
|
-
|
|
8
5
|
async function SessionStartApi(latitude, longitude, application_id) {
|
|
6
|
+
const BASE_URL = global.ShakebugSDKEndPointURL || "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
7
|
+
const API_KEY = global.ShakebugSDKEndPointURLheaderKey || "MarchShake2022";
|
|
8
|
+
|
|
9
9
|
|
|
10
10
|
let city = "";
|
|
11
11
|
let state = ""
|
|
@@ -57,24 +57,35 @@ async function SessionStartApi(latitude, longitude, application_id) {
|
|
|
57
57
|
|
|
58
58
|
let architecture = await DeviceInfo.supportedAbis()
|
|
59
59
|
|
|
60
|
+
const requestPayload = {
|
|
61
|
+
method: "startSession",
|
|
62
|
+
uuid: uuid || "",
|
|
63
|
+
applicationsid: application_id || "",
|
|
64
|
+
systemversion: system_version || "",
|
|
65
|
+
os: os || "",
|
|
66
|
+
language: (locals && locals[0]) ? locals[0].languageCode : "",
|
|
67
|
+
country: (locals && locals[0]) ? locals[0].countryCode : "",
|
|
68
|
+
phonename: (device_name || "").replace(/'/g, ""),
|
|
69
|
+
devicemodel: (architecture && architecture[0]) ? architecture[0] : "",
|
|
70
|
+
city: city || "",
|
|
71
|
+
state: state || "",
|
|
72
|
+
latitude: latitude === undefined || latitude === null ? "" : latitude,
|
|
73
|
+
longitude: longitude === undefined || longitude === null ? "" : longitude,
|
|
74
|
+
phonecarrier: phone_carrier || "",
|
|
75
|
+
appversion: app_version || "",
|
|
76
|
+
custom_user_id: Custom_User_Id || "",
|
|
77
|
+
sdk_version: global.sdk_version || "",
|
|
78
|
+
sdk_platform: global.sdk_platform || "",
|
|
79
|
+
sdk_platform_version: global.sdk_platform_version || ""
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
console.log("➡️ [Shakebug] SessionStartApi Request URL:", BASE_URL);
|
|
83
|
+
console.log("➡️ [Shakebug] SessionStartApi Payload:", requestPayload);
|
|
84
|
+
|
|
60
85
|
const formData = new FormData();
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
formData.append("systemversion", system_version)
|
|
65
|
-
formData.append("os", os)
|
|
66
|
-
formData.append("language", locals[0].languageCode)
|
|
67
|
-
formData.append("country", locals[0].countryCode)
|
|
68
|
-
formData.append("phonename", device_name)
|
|
69
|
-
formData.append("devicemodel", architecture[0])
|
|
70
|
-
formData.append("city", city)
|
|
71
|
-
formData.append("state", state)
|
|
72
|
-
formData.append("latitude", latitude)
|
|
73
|
-
formData.append("longitude", longitude)
|
|
74
|
-
formData.append("phonecarrier", phone_carrier)
|
|
75
|
-
formData.append("appversion", app_version)
|
|
76
|
-
formData.append("custom_user_id", Custom_User_Id || "")
|
|
77
|
-
formData.append("sdk_version", global.sdk_version)
|
|
86
|
+
Object.keys(requestPayload).forEach(key => {
|
|
87
|
+
formData.append(key, requestPayload[key]);
|
|
88
|
+
});
|
|
78
89
|
|
|
79
90
|
try {
|
|
80
91
|
const response = await fetch(BASE_URL, {
|
|
@@ -85,7 +96,17 @@ async function SessionStartApi(latitude, longitude, application_id) {
|
|
|
85
96
|
body: formData,
|
|
86
97
|
});
|
|
87
98
|
|
|
88
|
-
const
|
|
99
|
+
const responseText = await response.text();
|
|
100
|
+
console.log("⬅️ [Shakebug] SessionStartApi Raw Response:", responseText);
|
|
101
|
+
|
|
102
|
+
let data;
|
|
103
|
+
try {
|
|
104
|
+
data = JSON.parse(responseText);
|
|
105
|
+
} catch (parseError) {
|
|
106
|
+
console.error("❌ [Shakebug] Server returned invalid JSON. Could not parse:", responseText);
|
|
107
|
+
return { success: false, message: "Invalid server response" };
|
|
108
|
+
}
|
|
109
|
+
|
|
89
110
|
if (data.code === 200 && data.success === true) {
|
|
90
111
|
const session_id = data.response_data.session_id;
|
|
91
112
|
return { success: true, session_id, message: data.msg };
|
|
@@ -93,8 +114,8 @@ async function SessionStartApi(latitude, longitude, application_id) {
|
|
|
93
114
|
return { success: false, message: data.msg };
|
|
94
115
|
}
|
|
95
116
|
} catch (error) {
|
|
96
|
-
|
|
97
|
-
|
|
117
|
+
console.error('❌ [Shakebug] Error fetching data:', error);
|
|
118
|
+
return { success: false, message: "Network error" };
|
|
98
119
|
}
|
|
99
120
|
}
|
|
100
121
|
|
|
@@ -17,6 +17,7 @@ import LoadingModal from './LoadingModal';
|
|
|
17
17
|
|
|
18
18
|
LogBox.ignoreAllLogs()
|
|
19
19
|
|
|
20
|
+
let intervalId = null;
|
|
20
21
|
const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitle, allowToReportBugByShaking, allowToReportBugByScreenCapture, allowCrashReport }) => {
|
|
21
22
|
|
|
22
23
|
const { ShakebugSDKScreenShotDetector, ShakebugSDKSharedPreferencesModule, ShakebugSDKCustomScreenCapture} = NativeModules;
|
|
@@ -105,6 +106,20 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
105
106
|
return global.allowBugReport !== false && allowToReportBugByShaking !== false;
|
|
106
107
|
};
|
|
107
108
|
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
const triggerSubscription = DeviceEventEmitter.addListener('TriggerBugReportingEvent', () => {
|
|
111
|
+
log.info("TriggerBugReportingEvent received. global.isShakebugOpen:", global.isShakebugOpen);
|
|
112
|
+
if (!global.isShakebugOpen) {
|
|
113
|
+
setTriggred(true);
|
|
114
|
+
global.isShakebugOpen = true;
|
|
115
|
+
setTimeout(() => {
|
|
116
|
+
OpenShakebug(true); // Pass true to bypass shake checks
|
|
117
|
+
}, 200);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
return () => triggerSubscription.remove();
|
|
121
|
+
}, []);
|
|
122
|
+
|
|
108
123
|
setUpdateIntervalForType(SensorTypes.accelerometer, 200);
|
|
109
124
|
|
|
110
125
|
let iscrashSaveed = ""
|
|
@@ -242,6 +257,9 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
242
257
|
}, []);
|
|
243
258
|
|
|
244
259
|
const startTimer = () => {
|
|
260
|
+
if (intervalId) {
|
|
261
|
+
clearInterval(intervalId);
|
|
262
|
+
}
|
|
245
263
|
startTimeRef.current = Date.now();
|
|
246
264
|
intervalId = setInterval(() => {
|
|
247
265
|
if (global.isRecording) {
|
|
@@ -254,15 +272,16 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
254
272
|
const updateTimer = (elapsed) => {
|
|
255
273
|
const min = Math.floor(elapsed / 60);
|
|
256
274
|
const sec = parseInt(elapsed % 60);
|
|
275
|
+
const durationLimit = parseInt(global.videoDuration) || 20;
|
|
257
276
|
|
|
258
|
-
if (elapsed ==
|
|
277
|
+
if (elapsed == durationLimit) {
|
|
259
278
|
clearInterval(intervalId);
|
|
260
279
|
setTimeout(() => {
|
|
261
280
|
Stop()
|
|
262
281
|
}, 1000)
|
|
263
282
|
}
|
|
264
283
|
|
|
265
|
-
if (elapsed >
|
|
284
|
+
if (elapsed > durationLimit) {
|
|
266
285
|
RecordScreen.stopRecording()
|
|
267
286
|
.then(() => {
|
|
268
287
|
global.isMic = false;
|
|
@@ -387,8 +406,9 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
387
406
|
|
|
388
407
|
}, [isFocused])
|
|
389
408
|
|
|
390
|
-
const OpenShakebug = async () => {
|
|
391
|
-
if (!isBugReportingEnabled()) {
|
|
409
|
+
const OpenShakebug = async (bypassShakeCheck = false) => {
|
|
410
|
+
if (!bypassShakeCheck && !isBugReportingEnabled()) {
|
|
411
|
+
log.warn("OpenShakebug aborted: Bug reporting is disabled.");
|
|
392
412
|
return;
|
|
393
413
|
}
|
|
394
414
|
setIsScreenShot(true)
|
|
@@ -406,8 +426,14 @@ const ShakeFunction = ({ children, themeColor, showTutorialScreen, SDKScreenTitl
|
|
|
406
426
|
setTriggred(false)
|
|
407
427
|
global.isShakebugSDKOpen = true
|
|
408
428
|
navigate("FirstScreen", { img: `${ImgUrl}`, themeColor: `${themeColor}`, SDKScreenTitle: `${SDKScreenTitle}` })
|
|
429
|
+
} else {
|
|
430
|
+
log.warn("OpenShakebug aborted: Screenshot capture returned null.");
|
|
409
431
|
}
|
|
432
|
+
} else {
|
|
433
|
+
log.warn("OpenShakebug aborted: isShow is true (currently recording).");
|
|
410
434
|
}
|
|
435
|
+
} else {
|
|
436
|
+
log.warn("OpenShakebug aborted: Missing application_id or session_id. App_Id:", global.application_id, "Session_Id:", global.session_id);
|
|
411
437
|
}
|
|
412
438
|
}
|
|
413
439
|
|
package/src/Screens/Shakebug.js
CHANGED
|
@@ -49,7 +49,7 @@ global.isRecording = false
|
|
|
49
49
|
global.isScreenShotDetected = false
|
|
50
50
|
global.ShakebugLanguage = "ENGLISH"
|
|
51
51
|
global.makeLogEnabled = false
|
|
52
|
-
global.ShakebugSDKEndPointURL = "https://www.shakebug.com/api/v1.
|
|
52
|
+
global.ShakebugSDKEndPointURL = "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
53
53
|
global.ShakebugSDKEndPointURLheaderKey = 'MarchShake2022';
|
|
54
54
|
global.AllowVideo = false;
|
|
55
55
|
global.total_video = 0;
|
|
@@ -63,7 +63,7 @@ global.isScreeenShotTaken = false;
|
|
|
63
63
|
global.restrictedViews = [];
|
|
64
64
|
global.currentScreen = ""
|
|
65
65
|
global.isShakebugSDKOpen = false;
|
|
66
|
-
global.sdk_version = "2.4.
|
|
66
|
+
global.sdk_version = "2.4.11";
|
|
67
67
|
global.app_lunch_count = 0;
|
|
68
68
|
global.POPUP_LAUNCH_THRESHOLD = 3;
|
|
69
69
|
global.POPUP_COOLDOWN_DAYS = 2;
|
|
@@ -75,7 +75,12 @@ global.allowEvent = true;
|
|
|
75
75
|
global.allowReview = true;
|
|
76
76
|
global.allowSession = true;
|
|
77
77
|
global.shakebug_type = "1"; // default allow all
|
|
78
|
-
|
|
78
|
+
global.sdk_platform = "react-native";
|
|
79
|
+
try {
|
|
80
|
+
global.sdk_platform_version = require("react-native/package.json").version;
|
|
81
|
+
} catch (error) {
|
|
82
|
+
global.sdk_platform_version = "";
|
|
83
|
+
}
|
|
79
84
|
|
|
80
85
|
const ShakebugContext = React.createContext();
|
|
81
86
|
|
|
@@ -204,7 +209,7 @@ function Shakebug({ children, Android_appkey, iOS_appkey, showTutorialScreenFirs
|
|
|
204
209
|
const [focusedScreen, setFocusedScreen] = useState('');
|
|
205
210
|
global.ShakebugLanguage = ShakebugLanguage;
|
|
206
211
|
global.makeLogEnabled = makeLogEnabled;
|
|
207
|
-
global.ShakebugSDKEndPointURL = setShakebugSDKEndPointURL[0].length > 0 ? setShakebugSDKEndPointURL[0] : "https://www.shakebug.com/api/v1.
|
|
212
|
+
global.ShakebugSDKEndPointURL = setShakebugSDKEndPointURL[0].length > 0 ? setShakebugSDKEndPointURL[0] : "https://www.shakebug.com/api/v1.6/webservice.php/";
|
|
208
213
|
global.ShakebugSDKEndPointURLheaderKey = setShakebugSDKEndPointURL[1].length > 0 ? setShakebugSDKEndPointURL[1] : "MarchShake2022";
|
|
209
214
|
|
|
210
215
|
|
|
@@ -291,12 +296,12 @@ function Shakebug({ children, Android_appkey, iOS_appkey, showTutorialScreenFirs
|
|
|
291
296
|
const afterDaysTimestamp = now + sevenDaysInMs;
|
|
292
297
|
|
|
293
298
|
if (LAST_POPUP_TIME > afterDaysTimestamp) {
|
|
294
|
-
setShowModal(true)
|
|
299
|
+
setTimeout(() => { setShowModal(true) }, 15000);
|
|
295
300
|
}
|
|
296
301
|
|
|
297
302
|
}
|
|
298
303
|
else if (IS_REVIEW_SUBMITTED != "true") {
|
|
299
|
-
setShowModal(true)
|
|
304
|
+
setTimeout(() => { setShowModal(true) }, 15000);
|
|
300
305
|
}
|
|
301
306
|
}
|
|
302
307
|
|
package/src/index.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Shakebug, { AddEvent } from '../src/Screens/Shakebug';
|
|
3
3
|
import { getLocales } from '../GetLocals/src';
|
|
4
|
-
import { NativeModules, Text, View, findNodeHandle } from 'react-native';
|
|
4
|
+
import { NativeModules, Text, View, findNodeHandle, DeviceEventEmitter } from 'react-native';
|
|
5
5
|
import { useGlobalState } from './Componanats/GlobalStateContext'
|
|
6
6
|
import { CustomUserIdApi } from './APIs/CustomUserId'
|
|
7
7
|
import { FetchRemoteCodeAPI } from './APIs/FetchRemoteCodeAPI';
|
|
@@ -42,7 +42,7 @@ const ShakebugView: React.FC<ShakebugViewProps> = ({
|
|
|
42
42
|
allowCrashReport = true,
|
|
43
43
|
makeLogEnabled = false,
|
|
44
44
|
ShakebugLanguage = LocalLanguage != -1 ? Languages[LocalLanguage] : "ENGLISH",
|
|
45
|
-
setShakebugSDKEndPointURL = ["https://www.shakebug.com/api/v1.
|
|
45
|
+
setShakebugSDKEndPointURL = ["https://www.shakebug.com/api/v1.6/webservice.php/", "MarchShake2022", ""]
|
|
46
46
|
}) => {
|
|
47
47
|
|
|
48
48
|
return (
|
|
@@ -75,6 +75,7 @@ export const triggerBugReporting = (): void => {
|
|
|
75
75
|
}
|
|
76
76
|
global.isShakebugOpen = false;
|
|
77
77
|
global.isTrigger = true;
|
|
78
|
+
DeviceEventEmitter.emit('TriggerBugReportingEvent');
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
export const ShakebugSdkProtectedView = ({ children }) => {
|
package/Volumes:.fileloc
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
-
<plist version="1.0">
|
|
4
|
-
<dict>
|
|
5
|
-
<key>URL</key>
|
|
6
|
-
<string>file:///Volumes/Data/React-Native/expenzo/node_modules/shakebug-react-native/src</string>
|
|
7
|
-
</dict>
|
|
8
|
-
</plist>
|