From 268850bfac9c5a7285f04fd9c7b3367d60bd616e Mon Sep 17 00:00:00 2001 From: MxKevinBeqo Date: Wed, 15 Oct 2025 13:01:42 +0200 Subject: [PATCH 1/6] chore: update react-native-firebase to 19.3.0 --- .mx/known_dependencies.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.mx/known_dependencies.json b/.mx/known_dependencies.json index e596d9ab0..2870bad6a 100644 --- a/.mx/known_dependencies.json +++ b/.mx/known_dependencies.json @@ -1,7 +1,7 @@ { - "@react-native-firebase/app": "17.3.0", - "@react-native-firebase/messaging": "17.3.0", - "@react-native-firebase/crashlytics": "17.3.0", + "@react-native-firebase/app": "19.3.0", + "@react-native-firebase/messaging": "19.3.0", + "@react-native-firebase/crashlytics": "19.3.0", "@react-native-community/push-notification-ios": "1.10.1", "react-native-push-notification": "8.1.1", "react-native-maps": "0.31.1" From 20032e1cc537af78dd7b6dce0981156cc7dda34a Mon Sep 17 00:00:00 2001 From: MxKevinBeqo Date: Fri, 17 Oct 2025 13:08:12 +0200 Subject: [PATCH 2/6] chore: update firebase to 20.1.0 --- .mx/known_dependencies.json | 6 +++--- capabilities-setup-config.json | 3 ++- patches/apply-patches.js | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.mx/known_dependencies.json b/.mx/known_dependencies.json index 2870bad6a..a9cdbf4df 100644 --- a/.mx/known_dependencies.json +++ b/.mx/known_dependencies.json @@ -1,7 +1,7 @@ { - "@react-native-firebase/app": "19.3.0", - "@react-native-firebase/messaging": "19.3.0", - "@react-native-firebase/crashlytics": "19.3.0", + "@react-native-firebase/app": "20.1.0", + "@react-native-firebase/messaging": "20.1.0", + "@react-native-firebase/crashlytics": "20.1.0", "@react-native-community/push-notification-ios": "1.10.1", "react-native-push-notification": "8.1.1", "react-native-maps": "0.31.1" diff --git a/capabilities-setup-config.json b/capabilities-setup-config.json index 15da292c9..ef4a173f1 100644 --- a/capabilities-setup-config.json +++ b/capabilities-setup-config.json @@ -15,7 +15,8 @@ "android": { "gradle": { "classpaths": [ - "com.google.firebase:firebase-crashlytics-gradle:2.2.0" + "com.google.firebase:firebase-crashlytics-gradle:3.0.2", + "com.google.gms:google-services:4.4.1" ], "plugins": [ "com.google.firebase.crashlytics" diff --git a/patches/apply-patches.js b/patches/apply-patches.js index 51d36a9ef..b7b38d7e2 100755 --- a/patches/apply-patches.js +++ b/patches/apply-patches.js @@ -8,10 +8,10 @@ const patchOperations = [ dependency: "react-native-geocoder", patchFile: "react-native-geocoder+0.5.0.patch" }, - { - dependency: "@react-native-firebase/app", - patchFile: "@react-native-firebase+messaging+17.3.0.patch" - } + // { + // dependency: "@react-native-firebase/app", + // patchFile: "@react-native-firebase+messaging+17.3.0.patch" + // } ]; function hasDependency(name) { From bcd17a96ae2d5092996bddf08f83dfe437f3ed2e Mon Sep 17 00:00:00 2001 From: MxKevinBeqo Date: Wed, 22 Oct 2025 16:33:45 +0200 Subject: [PATCH 3/6] chore: override the firebase android sdk to support 16kb crashlytics libs --- android/build.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/android/build.gradle b/android/build.gradle index ed2f87945..23e589866 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -36,6 +36,18 @@ buildscript { } } +project.ext { + set('react-native', [ + versions: [ + // Override Firebase BOM version to avoid updating to RNFirebase 20.2.0+, + // which adds many new node_modules increasing the size significantly. + firebase: [ + bom: "33.1.1" + ], + ], + ]) +} + allprojects { repositories { all { repo -> From 3fb1da23322052718093147174ae2c34006726a6 Mon Sep 17 00:00:00 2001 From: MxKevinBeqo Date: Thu, 23 Oct 2025 14:37:07 +0200 Subject: [PATCH 4/6] chore: cleanup of old patch --- ...act-native-firebase+messaging+17.3.0.patch | 21 ------------------- patches/apply-patches.js | 6 +----- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 intermediary-patches/@react-native-firebase+messaging+17.3.0.patch diff --git a/intermediary-patches/@react-native-firebase+messaging+17.3.0.patch b/intermediary-patches/@react-native-firebase+messaging+17.3.0.patch deleted file mode 100644 index b7f285fad..000000000 --- a/intermediary-patches/@react-native-firebase+messaging+17.3.0.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/node_modules/@react-native-firebase/messaging/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingModule.java b/node_modules/@react-native-firebase/messaging/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingModule.java -index 3b89817..057083a 100644 ---- a/node_modules/@react-native-firebase/messaging/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingModule.java -+++ b/node_modules/@react-native-firebase/messaging/android/src/main/java/io/invertase/firebase/messaging/ReactNativeFirebaseMessagingModule.java -@@ -243,7 +243,15 @@ public class ReactNativeFirebaseMessagingModule extends ReactNativeFirebaseModul - @Override - public Map getConstants() { - final Map constants = new HashMap<>(); -- constants.put("isAutoInitEnabled", FirebaseMessaging.getInstance().isAutoInitEnabled()); -+ try { -+ constants.put("isAutoInitEnabled", FirebaseMessaging.getInstance().isAutoInitEnabled()); -+ } catch(Exception e) { -+ // Ignored on purpose -+ -+ // Ekrem: We had this patch for @10.1.0 version of this module. However, I'm not sure -+ // if we still need it after upgrading to @15.7.0. -+ } -+ - constants.put( - "isDeliveryMetricsExportToBigQueryEnabled", - FirebaseMessaging.getInstance().deliveryMetricsExportToBigQueryEnabled()); diff --git a/patches/apply-patches.js b/patches/apply-patches.js index b7b38d7e2..ced81bc10 100755 --- a/patches/apply-patches.js +++ b/patches/apply-patches.js @@ -7,11 +7,7 @@ const patchOperations = [ { dependency: "react-native-geocoder", patchFile: "react-native-geocoder+0.5.0.patch" - }, - // { - // dependency: "@react-native-firebase/app", - // patchFile: "@react-native-firebase+messaging+17.3.0.patch" - // } + } ]; function hasDependency(name) { From 1917cc3fd4557b87e3042cfb64b06cb959e4e060 Mon Sep 17 00:00:00 2001 From: MxKevinBeqo Date: Fri, 24 Oct 2025 11:44:18 +0200 Subject: [PATCH 5/6] chore: reverted unnecessary capabilities setup config changes --- capabilities-setup-config.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/capabilities-setup-config.json b/capabilities-setup-config.json index ef4a173f1..15da292c9 100644 --- a/capabilities-setup-config.json +++ b/capabilities-setup-config.json @@ -15,8 +15,7 @@ "android": { "gradle": { "classpaths": [ - "com.google.firebase:firebase-crashlytics-gradle:3.0.2", - "com.google.gms:google-services:4.4.1" + "com.google.firebase:firebase-crashlytics-gradle:2.2.0" ], "plugins": [ "com.google.firebase.crashlytics" From cdbbd9210d7b87be4a8aad382b0cc9ae1de34297 Mon Sep 17 00:00:00 2001 From: MxKevinBeqo Date: Wed, 29 Oct 2025 11:15:21 +0100 Subject: [PATCH 6/6] chore: add comment with affected dependencies in the bom override --- android/build.gradle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 23e589866..504dc2292 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -39,8 +39,11 @@ buildscript { project.ext { set('react-native', [ versions: [ - // Override Firebase BOM version to avoid updating to RNFirebase 20.2.0+, + // Override Firebase BOM version to avoid updating to react-native-firebase 20.2.0+, // which adds many new node_modules increasing the size significantly. + // Affected dependencies include the entire react-native-firebase suite e.g.: + // @react-native-firebase/app, @react-native-firebase/analytics, @react-native-firebase/crashlytics, @react-native-firebase/messaging + // NOTE: If updating to react-native-firebase 20.2.0+ is done, this override should be removed. firebase: [ bom: "33.1.1" ],