diff --git a/packages/cloud_firestore/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestoreMessageCodec.java b/packages/cloud_firestore/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestoreMessageCodec.java index c7ceb6b36f7c..0e0247915b7c 100644 --- a/packages/cloud_firestore/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestoreMessageCodec.java +++ b/packages/cloud_firestore/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestoreMessageCodec.java @@ -290,11 +290,11 @@ private FirebaseFirestore readFirestoreInstance(ByteBuffer buffer) { String databaseURL = (String) readValue(buffer); FirebaseFirestoreSettings settings = (FirebaseFirestoreSettings) readValue(buffer); synchronized (FlutterFirebaseFirestorePlugin.firestoreInstanceCache) { - if (FlutterFirebaseFirestorePlugin.getFirestoreInstanceByNameAndDatabaseUrl( - appName, databaseURL) - != null) { - return FlutterFirebaseFirestorePlugin.getFirestoreInstanceByNameAndDatabaseUrl( - appName, databaseURL); + FirebaseFirestore cachedFirestoreInstance = + FlutterFirebaseFirestorePlugin.getFirestoreInstanceByNameAndDatabaseUrl( + appName, databaseURL); + if (cachedFirestoreInstance != null) { + return cachedFirestoreInstance; } FirebaseApp app = FirebaseApp.getInstance(appName); diff --git a/packages/cloud_firestore/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestorePlugin.java b/packages/cloud_firestore/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestorePlugin.java index 0804d9939438..35e4697f7128 100644 --- a/packages/cloud_firestore/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestorePlugin.java +++ b/packages/cloud_firestore/cloud_firestore/android/src/main/java/io/flutter/plugins/firebase/firestore/FlutterFirebaseFirestorePlugin.java @@ -309,11 +309,11 @@ static FirebaseFirestoreSettings getSettingsFromPigeon( public static FirebaseFirestore getFirestoreFromPigeon( GeneratedAndroidFirebaseFirestore.FirestorePigeonFirebaseApp pigeonApp) { synchronized (FlutterFirebaseFirestorePlugin.firestoreInstanceCache) { - if (FlutterFirebaseFirestorePlugin.getFirestoreInstanceByNameAndDatabaseUrl( - pigeonApp.getAppName(), pigeonApp.getDatabaseURL()) - != null) { - return FlutterFirebaseFirestorePlugin.getFirestoreInstanceByNameAndDatabaseUrl( - pigeonApp.getAppName(), pigeonApp.getDatabaseURL()); + FirebaseFirestore cachedFirestoreInstance = + FlutterFirebaseFirestorePlugin.getFirestoreInstanceByNameAndDatabaseUrl( + pigeonApp.getAppName(), pigeonApp.getDatabaseURL()); + if (cachedFirestoreInstance != null) { + return cachedFirestoreInstance; } FirebaseApp app = FirebaseApp.getInstance(pigeonApp.getAppName()); diff --git a/packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb b/packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb index b4948a2ae0ce..ef11fb1d055b 100644 --- a/packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb +++ b/packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb @@ -1,4 +1,4 @@ # https://firebase.google.com/support/release-notes/ios def firebase_sdk_version!() - '11.2.0' + '11.4.0' end