shakebug-react-native 2.4.4 → 2.4.6

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/README.md CHANGED
@@ -49,12 +49,7 @@ Or if you prefer to use Yarn instead of npm:
49
49
  <key>NSPhotoLibraryUsageDescription</key>
50
50
  <string></string>
51
51
  ```
52
- 2. Manage Architecture:
53
- ```bash
54
- ENV['RCT_NEW_ARCH_ENABLED'] = '0'
55
- ```
56
-
57
- 3. CocoaPods installation:
52
+ 2. CocoaPods installation:
58
53
 
59
54
  ```bash
60
55
  cd ios && pod install && cd ..
@@ -99,27 +94,7 @@ export default App = () => {
99
94
  }
100
95
  ```
101
96
 
102
- If you use NavigationContainer in App.js/root file (where you import ShakebugView) then you need to pass independent as parameter in NavigationContainer
103
-
104
- ```javascript
105
-
106
- Import ShakebugView from 'shakebug-react-native';
107
97
 
108
- export default App = () => {
109
- return(
110
- <ShakebugView
111
- Android_appkey= “your android app key”
112
- iOS_appkey= “your ios app key”
113
- other options…
114
- >
115
- <NavigationContainer independent>
116
- //Your code...
117
- </NavigationContainer>
118
- </ShakebugView>
119
- )
120
- }
121
-
122
- ```
123
98
  You can add event on click:
124
99
 
125
100
  ```javascript
@@ -182,8 +157,6 @@ export default App = () => {
182
157
  )
183
158
  }
184
159
 
185
- ```
186
-
187
160
  ## Properties
188
161
 
189
162
  <table>
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "shakebug-react-native",
3
3
  "title": "shakebug-react-native",
4
- "version": "2.4.4",
4
+ "version": "2.4.6",
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
+ "types": "src/index.tsx",
7
8
  "scripts": {
8
9
  "test": "echo \"Error: no test specified\" && exit 1"
9
10
  },
@@ -28,22 +28,7 @@ Pod::Spec.new do |s|
28
28
  if respond_to?(:install_modules_dependencies, true)
29
29
  install_modules_dependencies(s)
30
30
  else
31
- s.dependency "React-Core"
32
-
33
-
34
- if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
35
- s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
36
- s.pod_target_xcconfig = {
37
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
38
- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
39
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
40
- }
41
- s.dependency "React-Codegen"
42
- s.dependency "RCT-Folly"
43
- s.dependency "RCTRequired"
44
- s.dependency "RCTTypeSafety"
45
- s.dependency "ReactCommon/turbomodule/core"
46
- end
31
+ s.dependency "React-Core"
47
32
  end
48
33
  end
49
34
 
@@ -1,6 +1,5 @@
1
1
  // NavigationContext.js
2
2
  import React, { createContext, useContext, useState } from 'react';
3
- import { useFocusEffect } from '@react-navigation/native';
4
3
 
5
4
  const NavigationContext = createContext();
6
5
 
@@ -23,16 +22,14 @@ export const NavigationProvider = ({ children }) => {
23
22
  }
24
23
  };
25
24
 
26
- useFocusEffect(
27
- React.useCallback(() => {
28
- if (navigationState && navigationState.length > 0) {
29
- setFocusedScreen(navigationState[navigationState.length - 1].name);
30
- }
31
- return () => {
32
- setFocusedScreen('');
33
- };
34
- }, [navigationState])
35
- );
25
+ React.useEffect(() => {
26
+ if (navigationState && navigationState.length > 0) {
27
+ setFocusedScreen(navigationState[navigationState.length - 1].name);
28
+ }
29
+ return () => {
30
+ setFocusedScreen('');
31
+ };
32
+ }, [navigationState]);
36
33
 
37
34
  return (
38
35
  <NavigationContext.Provider value={{ navigationState, navigate, goBack, focusedScreen, goToScreenAtIndex}}>
@@ -6,7 +6,6 @@ import AddDetailsScreen from './AddDetailsScreen';
6
6
  import TrimVideoScreen from './TrimVideoScreen'
7
7
  import DeviceInfo from '../../DeviceInfo';
8
8
  import { useEffect, useState } from 'react';
9
- import { useFocusEffect } from '@react-navigation/native';
10
9
  import GetLocation from '../../GetLocation'
11
10
  import NetInfo from '../../NetInfo/src'
12
11
  import { SessionStartApi } from '../APIs/StartSession';
@@ -53,7 +52,7 @@ global.isScreeenShotTaken = false;
53
52
  global.restrictedViews = [];
54
53
  global.currentScreen = ""
55
54
  global.isShakebugSDKOpen = false;
56
- global.sdk_version = "2.4.4";
55
+ global.sdk_version = "2.4.6";
57
56
  global.app_lunch_count = 0;
58
57
  global.POPUP_LAUNCH_THRESHOLD = 3;
59
58
  global.POPUP_COOLDOWN_DAYS = 2;
@@ -76,16 +75,14 @@ const NavigationContainer = ({ screens, setFocusedScreen }) => {
76
75
  const animation = React.useRef(new Animated.Value(0)).current;
77
76
  const { width } = Dimensions.get('window');
78
77
 
79
- useFocusEffect(
80
- React.useCallback(() => {
81
- if (navigationState && navigationState.length > 0) {
82
- setFocusedScreen(navigationState[navigationState.length - 1].name);
83
- }
84
- return () => {
85
- setFocusedScreen('');
86
- };
87
- }, [navigationState, setFocusedScreen])
88
- );
78
+ React.useEffect(() => {
79
+ if (navigationState && navigationState.length > 0) {
80
+ setFocusedScreen(navigationState[navigationState.length - 1].name);
81
+ }
82
+ return () => {
83
+ setFocusedScreen('');
84
+ };
85
+ }, [navigationState, setFocusedScreen]);
89
86
 
90
87
  React.useEffect(() => {
91
88
  Animated.timing(animation, {
package/src/index.tsx CHANGED
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import Shakebug, { AddEvent } from '../src/Screens/Shakebug';
3
- import { NavigationContainer, findFocusedRoute } from '@react-navigation/native';
4
3
  import { getLocales } from '../GetLocals/src';
5
4
  import { NativeModules, Text, View, findNodeHandle } from 'react-native';
6
5
  import { useGlobalState } from './Componanats/GlobalStateContext'
@@ -14,7 +13,7 @@ let LocalLanguage = LanguageCodes.indexOf(getLocales()[0].languageCode)
14
13
 
15
14
 
16
15
  // Define the props interface for ShakebugView
17
- interface ShakebugViewProps {
16
+ export interface ShakebugViewProps {
18
17
  children?: React.ReactNode;
19
18
  Android_appkey?: string;
20
19
  iOS_appkey?: string;
@@ -47,22 +46,20 @@ const ShakebugView: React.FC<ShakebugViewProps> = ({
47
46
  }) => {
48
47
 
49
48
  return (
50
- <NavigationContainer>
51
- <Shakebug
52
- children={children}
53
- Android_appkey={Android_appkey}
54
- iOS_appkey={iOS_appkey}
55
- showTutorialScreenFirstTime={showTutorialScreenFirstTime}
56
- ShakebugThemeColor={ShakebugThemeColor}
57
- changeSDKScreenTitle={changeSDKScreenTitle}
58
- allowToReportBugByScreenCapture={allowToReportBugByScreenCapture}
59
- allowToReportBugByShakingMobile={allowToReportBugByShakingMobile}
60
- allowCrashReport={__DEV__ ? false : allowCrashReport}
61
- makeLogEnabled={makeLogEnabled}
62
- ShakebugLanguage={Languages.includes(ShakebugLanguage) ? ShakebugLanguage : LocalLanguage != -1 ? Languages[LocalLanguage] : "ENGLISH"}
63
- setShakebugSDKEndPointURL={setShakebugSDKEndPointURL}
64
- />
65
- </NavigationContainer>
49
+ <Shakebug
50
+ children={children}
51
+ Android_appkey={Android_appkey}
52
+ iOS_appkey={iOS_appkey}
53
+ showTutorialScreenFirstTime={showTutorialScreenFirstTime}
54
+ ShakebugThemeColor={ShakebugThemeColor}
55
+ changeSDKScreenTitle={changeSDKScreenTitle}
56
+ allowToReportBugByScreenCapture={allowToReportBugByScreenCapture}
57
+ allowToReportBugByShakingMobile={allowToReportBugByShakingMobile}
58
+ allowCrashReport={__DEV__ ? false : allowCrashReport}
59
+ makeLogEnabled={makeLogEnabled}
60
+ ShakebugLanguage={Languages.includes(ShakebugLanguage) ? ShakebugLanguage : LocalLanguage != -1 ? Languages[LocalLanguage] : "ENGLISH"}
61
+ setShakebugSDKEndPointURL={setShakebugSDKEndPointURL}
62
+ />
66
63
  );
67
64
  };
68
65