Cloud_firestore firestore not working in release mode

Viewed 45

When trying to retrieve data from firestore in release mode but it is not working, I can send and get data in debug mode without any warning.

  • I have added Internet permissions <uses-permission android:name="android.permission.INTERNET" />
  • And I have added SHA certificate fingerprints (SHA-1).

Firestore Rules:

rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if
          request.time < timestamp.date(2022, 7, 19);
    }
  }
}

Packages added :

  firebase_core: ^1.5.0
  cloud_firestore: ^2.5.0
1 Answers
  • I removed the build files in the android folder.

  • I added SHA certificate fingerprints (release and build).

  • also changed signingConfig in build.gradle to signingConfig signingConfigs.release

now its works in debug and release mode

Related