Skip to content

Commit

Permalink
updated main_prod.dart to show debug token to run in ios simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
Raviramnani1 committed Jul 5, 2024
1 parent 6e34b69 commit c771410
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions wallet/lib/main_prod.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Future<void> main() async {
await FlutterDownloader.initialize(ignoreSsl: true);
await EasyLocalization.ensureInitialized();
await Firebase.initializeApp();
await FirebaseAppCheck.instance.activate(
appleProvider: AppleProvider.debug,);
await FirebaseCrashlytics.instance
.setCrashlyticsCollectionEnabled(!kDebugMode);

Expand Down Expand Up @@ -96,15 +98,7 @@ Future<void> initializeAppCheck() async {
// This kDebugMode check gets a android debug token from FirebaseAppCheck which can then be added on the Firebase console
// iOS debug token from FirebaseAppCheck automatically get without method channel when run on debug mode which can then be added on the Firebase console
// So that the application can be allowed to access to Firebase AppCheck token in debug mode.
if (kDebugMode && Platform.isAndroid) {
try {
const MethodChannel methodChannel =
MethodChannel(kGetFirebaseAppCheckTokenMethodChannelKey);
await methodChannel.invokeMethod(kGetFirebaseAppCheckDebugTokenKey);
} catch (e) {
e.toString().show();
}
}

}

class MyHttpOverrides extends HttpOverrides {
Expand Down

0 comments on commit c771410

Please sign in to comment.