I'm having an issue with App Attest and Firebase. I'm having my flutter app and tried to enable App Attest. Therefor I did what the documentation was saying:
- Set up firebase project
- Add the App check library to the app
- Initialize app check.
After that I enforced App Check in Firebase. App Attest and accessing the data does work if I publish to real device.
No I'm having the issue when using an simulator. I know, that I have to do some things to get it working on the simulator: https://firebase.google.com/docs/app-check/flutter/debug-provider:
- Activate App Check with debug provider
if (!kDebugMode) {
await FirebaseAppCheck.instance.activate(
androidProvider: AndroidProvider.playIntegrity,
appleProvider: AppleProvider.appAttest,
);
} else {
print("Debug Mode");
try {
await FirebaseAppCheck.instance.activate(
androidProvider: AndroidProvider.debug,
appleProvider: AppleProvider.debug);
} on FirebaseException catch (e) {
print("FirebaseException:" + e.toString());
}
}
- Enable debug logging in Xcode
- Get the local debug token from the debug output.
- In Firebase add the debug token to the registered debug tokens.
Unfortunately here starts the problem. After doing all this stuff, I cannot access the firestore data in the app through the simulator (android does work, iOS not). It keeps saying me, that I don't have the permissions: "[cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation."
DB-Rules should not be a problem, as they are not if I use a real device or I disable app Attest.
Additional info:
-) I changed app-attest-environment from "development" to "production"
-) Added appAttest capability in Xcode
Any ideas, what the hell is the problem?