I using firebase_app_check in my flutter app. And I use AppCheck in Firebase. it turned out to be not easy to set up, there are a lot of "white spots" in the documentation. so in order:
- I enabled AppCheck on Firebase(for starage and Firestore).
- I selected "Play Integrity"(so the documentation recommends) as attestation providers.
- I added plugin firebase_app_check to my app. But it not worked. the app(in debug mode) cannot retrieve data from the firestore.
- Then I added "SafetyNet" as attestation provider. After this app worked(debug mode).
- I publised my appbundle to Google Play. When I downloaded app from Google Play it not worked(cannot retrieve data from the firestore). I using obfuscation for my appbundle.
Why my app not worked with AppChecker in release mode? Why "Play Integrity" not worked? do I have to add code at the platform level? according to this document? like this:
val firebaseAppCheck = FirebaseAppCheck.getInstance()
firebaseAppCheck.installAppCheckProviderFactory(
SafetyNetAppCheckProviderFactory.getInstance()
)
or is one plugin enough?
How I can fix it?