@react-native-firebase/app 21.14.0 → 22.1.0

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/CHANGELOG.md CHANGED
@@ -3,6 +3,31 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [22.1.0](https://github.com/invertase/react-native-firebase/compare/v22.0.0...v22.1.0) (2025-04-30)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **app, expo:** add config plugin support for Expo SDK 53 ([#8495](https://github.com/invertase/react-native-firebase/issues/8495)) ([7617611](https://github.com/invertase/react-native-firebase/commit/7617611fb7ba903d7a15b44bc34c930a354a863c))
11
+ - **app, expo:** update config plugin to match Expo 53.0.1 AppDelegate ([#8500](https://github.com/invertase/react-native-firebase/issues/8500)) ([3d3c4ec](https://github.com/invertase/react-native-firebase/commit/3d3c4ece9f9a9de76e36f4f35611fca5ed208abc))
12
+ - **app:** provide modular-like APIs for RNFB-specific json/meta/preferences methods ([9bb5365](https://github.com/invertase/react-native-firebase/commit/9bb536523869a21a26bd46756d0f42ee2ff34321))
13
+ - **app:** toString() does not exist in modular API, use .name property ([2a99366](https://github.com/invertase/react-native-firebase/commit/2a99366ae56a36a6d4b3bdb7beca6137c4040e59))
14
+
15
+ ## [22.0.0](https://github.com/invertase/react-native-firebase/compare/v21.14.0...v22.0.0) (2025-04-25)
16
+
17
+ ### ⚠ BREAKING CHANGES
18
+
19
+ - **app, sdks:** firebase-ios-sdk 11.12.0 requires Xcode 16.2+
20
+
21
+ ### Features
22
+
23
+ - **app, sdks:** firebase-ios-sdk 11.12.0 / firebase-android-sdk 33.13.0 ([c63d843](https://github.com/invertase/react-native-firebase/commit/c63d8435b678742cfdd98f4d1d8895134cb9cf09))
24
+
25
+ ### Bug Fixes
26
+
27
+ - **analytics:** Type defs ([#8363](https://github.com/invertase/react-native-firebase/issues/8363)) ([74efc84](https://github.com/invertase/react-native-firebase/commit/74efc848e3ecda47b5c7cdf79e5e72370cd10b7d))
28
+ - **android:** use `=` assignment vs deprecated space-assignment ([39c2ecb](https://github.com/invertase/react-native-firebase/commit/39c2ecb0069a8a5a65b04fb7f86ccecf83273868))
29
+ - enable provenance signing during publish ([4535f0d](https://github.com/invertase/react-native-firebase/commit/4535f0d5756c89aeb8f8e772348c71d8176348be))
30
+
6
31
  ## [21.14.0](https://github.com/invertase/react-native-firebase/compare/v21.13.0...v21.14.0) (2025-04-14)
7
32
 
8
33
  ### Features
@@ -62,11 +62,11 @@ if (rootProject.ext && rootProject.ext.firebaseJson) {
62
62
  android {
63
63
  def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0].toInteger()
64
64
  if (agpVersion >= 7) {
65
- namespace 'io.invertase.firebase'
65
+ namespace = 'io.invertase.firebase'
66
66
  }
67
67
 
68
68
  defaultConfig {
69
- multiDexEnabled true
69
+ multiDexEnabled = true
70
70
  manifestPlaceholders = [
71
71
  firebaseJsonDataCollectionDefaultEnabled: dataCollectionDefaultEnabled
72
72
  ]
@@ -74,17 +74,17 @@ android {
74
74
 
75
75
  buildFeatures {
76
76
  // AGP 8 no longer builds config by default
77
- buildConfig true
77
+ buildConfig = true
78
78
  }
79
79
 
80
80
  lintOptions {
81
81
  disable 'GradleCompatible'
82
- abortOnError false
82
+ abortOnError = false
83
83
  }
84
84
  if (agpVersion < 8) {
85
85
  compileOptions {
86
- sourceCompatibility JavaVersion.VERSION_11
87
- targetCompatibility JavaVersion.VERSION_11
86
+ sourceCompatibility = JavaVersion.VERSION_11
87
+ targetCompatibility = JavaVersion.VERSION_11
88
88
  }
89
89
  }
90
90
 
@@ -18,5 +18,5 @@ package io.invertase.firebase.app;
18
18
  */
19
19
  // generated file - do not modify or commit
20
20
  public class ReactNativeFirebaseVersion {
21
- public static String VERSION = "21.14.0";
21
+ public static String VERSION = "22.1.0";
22
22
  }
@@ -18,4 +18,4 @@
18
18
  #import <React/RCTVersion.h>
19
19
 
20
20
  // generated file - do not modify or commit
21
- NSString* const RNFBVersionString = @"21.14.0";
21
+ NSString* const RNFBVersionString = @"22.1.0";
@@ -73,7 +73,7 @@ export default class FirebaseApp {
73
73
  }
74
74
 
75
75
  toString() {
76
- warnIfNotModularCall(arguments);
76
+ warnIfNotModularCall(arguments, '.name property');
77
77
  return this.name;
78
78
  }
79
79
  }
@@ -218,26 +218,22 @@ export function setLogLevel(logLevel) {
218
218
  }
219
219
 
220
220
  export function setReactNativeAsyncStorage(asyncStorage) {
221
+ warnIfNotModularCall(arguments, 'setReactNativeAsyncStorage()');
222
+
221
223
  if (!isObject(asyncStorage)) {
222
- throw new Error("firebase.setReactNativeAsyncStorage(*) 'asyncStorage' must be an object.");
224
+ throw new Error("setReactNativeAsyncStorage(*) 'asyncStorage' must be an object.");
223
225
  }
224
226
 
225
227
  if (!isFunction(asyncStorage.setItem)) {
226
- throw new Error(
227
- "firebase.setReactNativeAsyncStorage(*) 'asyncStorage.setItem' must be a function.",
228
- );
228
+ throw new Error("setReactNativeAsyncStorage(*) 'asyncStorage.setItem' must be a function.");
229
229
  }
230
230
 
231
231
  if (!isFunction(asyncStorage.getItem)) {
232
- throw new Error(
233
- "firebase.setReactNativeAsyncStorage(*) 'asyncStorage.getItem' must be a function.",
234
- );
232
+ throw new Error("setReactNativeAsyncStorage(*) 'asyncStorage.getItem' must be a function.");
235
233
  }
236
234
 
237
235
  if (!isFunction(asyncStorage.removeItem)) {
238
- throw new Error(
239
- "firebase.setReactNativeAsyncStorage(*) 'asyncStorage.removeItem' must be a function.",
240
- );
236
+ throw new Error("setReactNativeAsyncStorage(*) 'asyncStorage.removeItem' must be a function.");
241
237
  }
242
238
 
243
239
  setReactNativeAsyncStorageInternal(asyncStorage);
@@ -70,3 +70,51 @@ export function getApp(name?: string): FirebaseApp;
70
70
  * @returns void
71
71
  */
72
72
  export function setLogLevel(logLevel: LogLevelString): void;
73
+
74
+ /**
75
+ * Gets react-native-firebase specific "meta" data from native Info.plist / AndroidManifest.xml
76
+ * @returns map of key / value pairs containing native meta data
77
+ */
78
+ export function metaGetAll(): Promise<{ [keyof: string]: string | boolean }>;
79
+
80
+ /**
81
+ * Gets react-native-firebase specific "firebase.json" data
82
+ * @returns map of key / value pairs containing native firebase.json constants
83
+ */
84
+ export function jsonGetAll(): Promise<{ [keyof: string]: string | boolean }>;
85
+
86
+ /**
87
+ * Clears react-native-firebase specific native preferences
88
+ * @returns Promise<void>
89
+ */
90
+ export function preferencesClearAll(): Promise<void>;
91
+
92
+ /**
93
+ * Gets react-native-firebase specific native preferences
94
+ * @returns map of key / value pairs containing native preferences data
95
+ */
96
+ export function preferencesGetAll(): Promise<{ [keyof: string]: string | boolean }>;
97
+
98
+ /**
99
+ * Sets react-native-firebase specific native boolean preference
100
+ * @param key the name of the native preference to set
101
+ * @param value the value of the native preference to set
102
+ * @returns Promise<void>
103
+ */
104
+ export function preferencesSetBool(key: string, value: boolean): Promise<void>;
105
+
106
+ /**
107
+ * Sets react-native-firebase specific native string preference
108
+ * @param key the name of the native preference to set
109
+ * @param value the value of the native preference to set
110
+ * @returns Promise<void>
111
+ */
112
+ export function preferencesSetString(key: string, value: string): Promise<void>;
113
+
114
+ /**
115
+ * The `AsyncStorage` implementation to use for persisting data on 'Other' platforms.
116
+ * If not specified, in memory persistence is used.
117
+ *
118
+ * This is required if you want to persist things like Auth sessions, Analytics device IDs, etc.
119
+ */
120
+ export function setReactNativeAsyncStorage(asyncStorage: ReactNativeAsyncStorage): void;
@@ -6,6 +6,7 @@ import {
6
6
  getApps as getAppsCompat,
7
7
  initializeApp as initializeAppCompat,
8
8
  setLogLevel as setLogLevelCompat,
9
+ setReactNativeAsyncStorage as setReactNativeAsyncStorageCompat,
9
10
  } from '../internal';
10
11
  import { setUserLogHandler } from '../internal/logger';
11
12
  import sdkVersion from '../version';
@@ -84,4 +85,66 @@ export function setLogLevel(logLevel) {
84
85
  return setLogLevelCompat.call(null, logLevel, MODULAR_DEPRECATION_ARG);
85
86
  }
86
87
 
88
+ /**
89
+ * The `AsyncStorage` implementation to use for persisting data on 'Other' platforms.
90
+ * If not specified, in memory persistence is used.
91
+ *
92
+ * This is required if you want to persist things like Auth sessions, Analytics device IDs, etc.
93
+ */
94
+ export function setReactNativeAsyncStorage(asyncStorage) {
95
+ return setReactNativeAsyncStorageCompat.call(null, asyncStorage, MODULAR_DEPRECATION_ARG);
96
+ }
97
+
98
+ /**
99
+ * Gets react-native-firebase specific "meta" data from native Info.plist / AndroidManifest.xml
100
+ * @returns map of key / value pairs containing native meta data
101
+ */
102
+ export function metaGetAll() {
103
+ return NativeModules.RNFBAppModule.metaGetAll();
104
+ }
105
+
106
+ /**
107
+ * Gets react-native-firebase specific "firebase.json" data
108
+ * @returns map of key / value pairs containing native firebase.json constants
109
+ */
110
+ export function jsonGetAll() {
111
+ return NativeModules.RNFBAppModule.jsonGetAll();
112
+ }
113
+
114
+ /**
115
+ * Clears react-native-firebase specific native preferences
116
+ * @returns Promise<void>
117
+ */
118
+ export function preferencesClearAll() {
119
+ return NativeModules.RNFBAppModule.preferencesClearAll();
120
+ }
121
+
122
+ /**
123
+ * Gets react-native-firebase specific native preferences
124
+ * @returns map of key / value pairs containing native preferences data
125
+ */
126
+ export function preferencesGetAll() {
127
+ return NativeModules.RNFBAppModule.preferencesGetAll();
128
+ }
129
+
130
+ /**
131
+ * Sets react-native-firebase specific native boolean preference
132
+ * @param key the name of the native preference to set
133
+ * @param value the value of the native preference to set
134
+ * @returns Promise<void>
135
+ */
136
+ export function preferencesSetBool(key, value) {
137
+ return NativeModules.RNFBAppModule.preferencesSetBool(key, value);
138
+ }
139
+
140
+ /**
141
+ * Sets react-native-firebase specific native string preference
142
+ * @param key the name of the native preference to set
143
+ * @param value the value of the native preference to set
144
+ * @returns Promise<void>
145
+ */
146
+ export function preferencesSetString(key, value) {
147
+ return NativeModules.RNFBAppModule.preferencesSetString(key, value);
148
+ }
149
+
87
150
  export const SDK_VERSION = sdkVersion;
package/lib/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- module.exports = '21.14.0';
2
+ module.exports = '22.1.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/app",
3
- "version": "21.14.0",
3
+ "version": "22.1.0",
4
4
  "author": "Invertase <oss@invertase.io> (http://invertase.io)",
5
5
  "description": "A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Storage and more.",
6
6
  "main": "lib/index.js",
@@ -60,8 +60,8 @@
60
60
  "firebase": "11.3.1"
61
61
  },
62
62
  "devDependencies": {
63
- "@react-native-async-storage/async-storage": "^2.1.1",
64
- "expo": "^52.0.35"
63
+ "@react-native-async-storage/async-storage": "^2.1.2",
64
+ "expo": "^52.0.46"
65
65
  },
66
66
  "peerDependenciesMeta": {
67
67
  "expo": {
@@ -69,11 +69,12 @@
69
69
  }
70
70
  },
71
71
  "publishConfig": {
72
- "access": "public"
72
+ "access": "public",
73
+ "provenance": true
73
74
  },
74
75
  "sdkVersions": {
75
76
  "ios": {
76
- "firebase": "11.11.0",
77
+ "firebase": "11.12.0",
77
78
  "iosTarget": "13.0",
78
79
  "macosTarget": "10.15",
79
80
  "tvosTarget": "13.0"
@@ -82,7 +83,7 @@
82
83
  "minSdk": 21,
83
84
  "targetSdk": 34,
84
85
  "compileSdk": 34,
85
- "firebase": "33.12.0",
86
+ "firebase": "33.13.0",
86
87
  "firebaseCrashlyticsGradle": "3.0.3",
87
88
  "firebasePerfGradle": "1.4.2",
88
89
  "gmsGoogleServicesGradle": "4.4.2",
@@ -90,5 +91,5 @@
90
91
  "firebaseAppDistributionGradle": "5.1.1"
91
92
  }
92
93
  },
93
- "gitHead": "7c7beaab9cf8a619927a33ef7a15b8000e2874c2"
94
+ "gitHead": "af6096ed9df878f0f169e899564b0aab68d396e5"
94
95
  }
@@ -61,7 +61,7 @@ function modifyObjcAppDelegate(contents) {
61
61
  }
62
62
  function modifySwiftAppDelegate(contents) {
63
63
  const methodInvocationBlock = `FirebaseApp.configure()`;
64
- const methodInvocationLineMatcher = /(?:self\.moduleName\s*=\s*"([^"]*)")/g;
64
+ const methodInvocationLineMatcher = /(?:self\.moduleName\s*=\s*"([^"]*)")|(?:factory\.startReactNative\()/;
65
65
  // Add import
66
66
  if (!contents.includes('import FirebaseCore')) {
67
67
  contents = contents.replace(/import Expo/g, `import Expo
@@ -70,7 +70,8 @@ export function modifyObjcAppDelegate(contents: string): string {
70
70
 
71
71
  export function modifySwiftAppDelegate(contents: string): string {
72
72
  const methodInvocationBlock = `FirebaseApp.configure()`;
73
- const methodInvocationLineMatcher = /(?:self\.moduleName\s*=\s*"([^"]*)")/g;
73
+ const methodInvocationLineMatcher =
74
+ /(?:self\.moduleName\s*=\s*"([^"]*)")|(?:factory\.startReactNative\()/;
74
75
 
75
76
  // Add import
76
77
  if (!contents.includes('import FirebaseCore')) {
@@ -1 +1 @@
1
- {"root":["./src/index.ts","./src/android/applyPlugin.ts","./src/android/buildscriptDependency.ts","./src/android/constants.ts","./src/android/copyGoogleServices.ts","./src/android/index.ts","./src/ios/appDelegate.ts","./src/ios/googleServicesPlist.ts","./src/ios/index.ts"],"version":"5.7.3"}
1
+ {"root":["./src/index.ts","./src/android/applyPlugin.ts","./src/android/buildscriptDependency.ts","./src/android/constants.ts","./src/android/copyGoogleServices.ts","./src/android/index.ts","./src/ios/appDelegate.ts","./src/ios/googleServicesPlist.ts","./src/ios/index.ts"],"version":"5.8.3"}