wudebin преди 3 месеца
родител
ревизия
34853dccd0

+ 2 - 0
Strides-SPAPP/android/app/build.gradle

@@ -2,6 +2,7 @@ apply plugin: "com.android.application"
 apply plugin: "org.jetbrains.kotlin.android"
 apply plugin: "com.facebook.react"
 apply plugin: "com.google.gms.google-services"
+apply plugin: "com.google.firebase.crashlytics"
 
 /**
  * This is the configuration block to customize your React Native Android app.
@@ -182,6 +183,7 @@ dependencies {
     implementation platform('com.google.firebase:firebase-bom:33.7.0')
     implementation 'com.google.firebase:firebase-messaging'
     implementation 'com.google.firebase:firebase-analytics'
+    implementation 'com.google.firebase:firebase-crashlytics'
 }
 
 //apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle")

+ 2 - 1
Strides-SPAPP/android/build.gradle

@@ -23,7 +23,8 @@ buildscript {
     dependencies {
         classpath("com.android.tools.build:gradle")
         classpath("com.facebook.react:react-native-gradle-plugin")
-        classpath("com.google.gms:google-services:4.4.2")
+        classpath("com.google.gms:google-services:4.3.15")
+        classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.9")
         classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
     }
 }

+ 2 - 0
Strides-SPAPP/app/pages/home/Index.js

@@ -17,6 +17,7 @@ import DrawerView from './Drawer.js';
 import DrawerViewV2 from './DrawerV2.js';
 import DrawerViewV3 from './DrawerV3.js';
 import DrawerViewV4 from './DrawerV4.js';
+import crashlytics from '@react-native-firebase/crashlytics';
 
 const Drawer = createDrawerNavigator();
 
@@ -43,6 +44,7 @@ export default class Home extends Component {
         this.setState({
           userInfo: info
         });
+        crashlytics().setUserId("" + info.userPk)
       }, true);
       if (app.notifications.enable && this.state.isLogin) {
         this.getNotificationTotal();

+ 2 - 0
Strides-SPAPP/app/utils/constant.js

@@ -269,6 +269,8 @@ global.ui = StyleSheet.create({
   }
 });
 
+globalThis.RNFB_SILENCE_MODULAR_DEPRECATION_WARNINGS = true;
+
 /*if (!__DEV__) {
   global.console = {
     info: () => {},

+ 2 - 0
Strides-SPAPP/package.json

@@ -26,6 +26,8 @@
     "@react-native-community/checkbox": "0.5.20",
     "@react-native-community/geolocation": "3.4.0",
     "@react-native-community/push-notification-ios": "1.11.0",
+    "@react-native-firebase/app": "23.8.6",
+    "@react-native-firebase/crashlytics": "23.8.6",
     "@react-native-masked-view/masked-view": "0.3.0",
     "@react-native-vector-icons": "https://gitee.com/vbes/react-native-vector-icons.git",
     "@react-native-vector-icons/ant-design": "file:node_modules/@react-native-vector-icons/ant-design",