@umituz/react-native-firebase 1.7.4 → 1.7.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-firebase",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "description": "Unified Firebase package for React Native apps - Centralized initialization and core services (Analytics, Crashlytics).",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -33,8 +33,13 @@
33
33
  "react-native": ">=0.74.0"
34
34
  },
35
35
  "devDependencies": {
36
+ "@react-native-firebase/analytics": "^23.7.0",
37
+ "@react-native-firebase/app": "^23.7.0",
38
+ "@react-native-firebase/crashlytics": "^23.7.0",
39
+ "@react-navigation/native": "^7.1.26",
36
40
  "@types/react": "~19.1.0",
37
41
  "firebase": "^12.6.0",
42
+ "react-native": "^0.83.1",
38
43
  "typescript": "~5.9.2"
39
44
  },
40
45
  "publishConfig": {
@@ -61,11 +61,10 @@ export class AnalyticsInitializerService {
61
61
  }
62
62
 
63
63
  // Try to get Firebase App instance to check if it's initialized
64
- let firebaseApp: any = null;
65
64
  try {
66
65
  // eslint-disable-next-line @typescript-eslint/no-require-imports
67
66
  const firebaseAppModule = require('@react-native-firebase/app');
68
- firebaseApp = firebaseAppModule.app();
67
+ firebaseAppModule.app();
69
68
  } catch (appError: any) {
70
69
  /* eslint-disable-next-line no-console */
71
70
  if (__DEV__) {
@@ -57,6 +57,7 @@ export function TrackOperation(
57
57
  operation: operationName,
58
58
  method: propertyKey,
59
59
  success: false,
60
+ errorType,
60
61
  duration_ms: Date.now() - startTime,
61
62
  });
62
63
 
@@ -19,8 +19,6 @@ export interface ICrashlyticsService {
19
19
  }
20
20
 
21
21
  class FirebaseCrashlyticsService implements ICrashlyticsService {
22
- private isInitialized = false;
23
- private userId: string | null = null;
24
22
  private attributes: Record<string, string> = {};
25
23
  private crashlytics: CrashlyticsInstance | null = null;
26
24
  private isDestroyed = false;
@@ -39,10 +37,9 @@ class FirebaseCrashlyticsService implements ICrashlyticsService {
39
37
 
40
38
  if (this.crashlytics) {
41
39
  if (userId) {
42
- this.userId = userId;
43
40
  await crashlyticsUserService.setUserId(this.crashlytics, userId);
44
41
  }
45
-
42
+
46
43
  if (attributes) {
47
44
  await this.setAttributes(attributes);
48
45
  }
@@ -53,7 +50,6 @@ class FirebaseCrashlyticsService implements ICrashlyticsService {
53
50
  console.warn('[Crashlytics] Init failed:', err);
54
51
  }
55
52
  } finally {
56
- this.isInitialized = true;
57
53
  }
58
54
  }
59
55
 
@@ -82,14 +78,12 @@ class FirebaseCrashlyticsService implements ICrashlyticsService {
82
78
  async clearUserData(): Promise<void> {
83
79
  if (this.isDestroyed) return;
84
80
  await crashlyticsUserService.clearUserData(this.crashlytics);
85
- this.userId = null;
86
81
  this.attributes = {};
87
- this.isInitialized = false;
88
82
  }
89
83
 
90
84
  async destroy(): Promise<void> {
91
85
  if (this.isDestroyed) return;
92
-
86
+
93
87
  await this.clearUserData();
94
88
  this.crashlytics = null;
95
89
  this.isDestroyed = true;