Skip to content

Commit

Permalink
Merge pull request #2447 from Pylons-tech/update-readme
Browse files Browse the repository at this point in the history
updated readme.md and appdelegate.swift
  • Loading branch information
MikeSofaer authored Jul 18, 2024
2 parents fcad761 + 2d62309 commit ca8681e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions wallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Pylons Wallet

This project is a starting point for a Flutter application.

1) Req .prod_env file and place it in /wallet/env/ dir.
2) Req GoogleService-Info.plist file and place it in /wallet/ios/runner dir.
3) Req Google-services.json file and place it in /wallet/android/app dir.
4) Req to add generated simulator Debug token to be added in firebase console>ios debug.



Expand Down
11 changes: 8 additions & 3 deletions wallet/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@ import flutter_downloader
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Uncomment while using ios simulator
// let providerFactory = AppCheckDebugProviderFactory()
// AppCheck.setAppCheckProviderFactory(providerFactory)
// Uncomment while using ios simulator

#if DEBUG
let providerFactory = AppCheckDebugProviderFactory()
AppCheck.setAppCheckProviderFactory(providerFactory)
FirebaseApp.configure()
#endif
// Register Flutter plugins
GeneratedPluginRegistrant.register(with: self)
FlutterDownloaderPlugin.setPluginRegistrantCallback(registerPlugins)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
Expand Down
4 changes: 3 additions & 1 deletion 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,7 +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) {
if (kDebugMode && Platform.isAndroid) {
try {
const MethodChannel methodChannel =
MethodChannel(kGetFirebaseAppCheckTokenMethodChannelKey);
Expand Down

0 comments on commit ca8681e

Please sign in to comment.