Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated readme.md and appdelegate.swift #2447

Merged
merged 5 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Raviramnani1 marked this conversation as resolved.
Show resolved Hide resolved
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
Loading