Closed PaulRudin closed 1 year ago
Hi @PaulRudin
Are there any errors logged? Have you tried using the latest version firebase_app_check: ^0.0.2
?
Thank you
I have upgraded firebase_app_check to 0.0.2, but the behaviour is the same. There's no error logged.
Have you tried the instructions in the firebase docs?
Yeah, so I'd already experimented with those instructions. I've found that adding -FIRDebugEnabled
to the launch arguments makes no difference. Adding FirebaseApp.configure()
in AppDelegate.swift causes the app to crash after startup (which is perhaps not a surprise as I've already got Firebase.initializeApp();
in my dart code - not sure?)
If I can find time tomorrow I'll try to make a minimal project that exhibits this behaviour... at least then we might have an idea if it's peculiar to something I've done or it's a general problem with flutter/ios/appcheck/emulator/debug tokens
There are some general issues with appcheck right now (some of which have been fixed but are pending a new firebase sdk release) so I'll label this based on the report for now. Haven't been able to reproduce this myself though.
I am facing the same issue, debug token is not generated. with the latest version 0.0.3
I ran into the same issue today ( with firebase_app_check: ^0.0.6+2
).
I found that while no debug token is printed to the console when running flutter run
the token was printed to the console when running the project directly from Xcode. I am not sure what exactly the issue is, but maybe it helps.
For everyone struggling with this issue, what did you end up doing? Not enforcing AppCheck?
Or did you stop using the iOS Simulator for dev?
You don't see the output in the console from flutter run
, but if you launch via xcode, then you can see it in the output that xcode shows.
In case this helps anyone, I got the debug token to generate with firebase_app_check v0.0.8. As previously mentioned, the debug token displays when you launch directly from xcode.
In addition, I found that these lines:
let providerFactory = AppCheckDebugProviderFactory()
AppCheck.setAppCheckProviderFactory(providerFactory)
Must occur BEFORE this line:
GeneratedPluginRegistrant.register(with: self)
I have no idea why, but the other way did not generate a token. I suspect it is related to this line in the documentation: "In your debug build before using any Firebase backend services, create and set the App Check debug provider factory".
Closing since @OfirMarom response is working
Bug report
I have followed the instructions for activating the debug Appcheck provider here: https://firebase.flutter.dev/docs/app-check/usage/#activating-the-debug-provider-iosmacos but do not see a logged debug token.
App check works fine running on real ios devices, but when I attempt to run on a simulator, I don't get a debug token logged, and I can see in the firebase console that attempts to read the realtime database are being blocked by appcheck.
Steps to reproduce
Steps to reproduce the behavior:
import google_mobile_ads
import Firebase
@UIApplicationMain @objc class AppDelegate: FlutterAppDelegate {
override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self)
} }
flutter doctor Doctor summary (to see all details, run flutter doctor -v): [β] Flutter (Channel stable, 2.2.3, on macOS 11.5.2 20G95 darwin-arm, locale en-GB) [β] Android toolchain - develop for Android devices β Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use
flutter config --android-sdk
to update to that location.[β] Xcode - develop for iOS and macOS [β] Chrome - develop for the web [!] Android Studio (not installed) [β] Connected device (3 available)
! Doctor found issues in 2 categories.
Changing current working directory to: /Users/paulrudin/Dropbox/livefpl-ui Dart SDK 2.13.4 Flutter SDK 2.2.3 liveff 0.0.116+64
dependencies:
dev dependencies:
transitive dependencies: