From 8bcbe1e403def3556e77d96e98482e3af01cb03f Mon Sep 17 00:00:00 2001 From: Nikolaus Heger Date: Fri, 26 Apr 2024 12:18:18 +0800 Subject: [PATCH] Bugfix/maintenance 2023 (#1943) * compatibility flag added * lint error * package conflicts replacing flutterfire_extensions with the official package to fix iOS bug. * xcode stuff that xcode does * platform changed to 13 * xcode stuff * new API * new API * updated packages and changed APIs * update package * still not working on android build * making android compile * fix android build * new import api (#1944) --- android/app/build.gradle | 20 +++- android/app/src/main/AndroidManifest.xml | 1 + android/build.gradle | 12 +- android/gradle.properties | 2 - .../gradle/wrapper/gradle-wrapper.properties | 3 +- android/settings.gradle | 18 ++- ios/Podfile | 4 +- ios/Runner.xcodeproj/project.pbxproj | 113 ++++++++++-------- ios/Runner/Info.plist | 2 + .../deeplink/viewmodels/deeplink_bloc.dart | 21 ++-- lib/components/qr_code_generator_widget.dart | 3 +- lib/crypto/eosdart/eosdart.dart | 1 - lib/crypto/eosdart/src/client.dart | 24 +++- lib/datasource/local/biometrics_service.dart | 4 +- .../local/firebase_dynamic_link_service.dart | 7 +- .../remote/api/key_accounts_repository.dart | 31 ++++- .../firebase/firebase_remote_config.dart | 4 +- .../firebase_database_regions_repository.dart | 4 +- .../region_location_model.dart | 4 +- lib/datasource/remote/model/region_model.dart | 4 +- .../usecases/import_key_use_case.dart | 2 +- .../usecases/import_accounts_use_case.dart | 2 +- .../usecases/get_support_data_usecase.dart | 2 +- pubspec.yaml | 23 ++-- 24 files changed, 184 insertions(+), 127 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index b088905d1..394228cf9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -32,7 +32,19 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 32 + namespace "com.joinseeds.seedswallet" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -45,11 +57,12 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.joinseeds.seedswallet" - minSdkVersion 23 - targetSdkVersion 30 + minSdkVersion 20 + targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + multiDexEnabled true } signingConfigs { @@ -79,6 +92,7 @@ dependencies { implementation 'com.google.firebase:firebase-dynamic-links:19.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'com.google.firebase:firebase-messaging:20.2.4' + implementation 'androidx.multidex:multidex:2.0.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 427b76052..a7468ba50 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -31,6 +31,7 @@ plugins.load(reader) } -} +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } -plugins.each { name, path -> - def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() - include ":$name" - project(":$name").projectDir = pluginDirectory -} +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/ios/Podfile b/ios/Podfile index 115ce522e..28a36e4e4 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '12.0' +platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -38,7 +38,7 @@ post_install do |installer| installer.pods_project.targets.each do |target| flutter_additional_ios_build_settings(target) target.build_configurations.each do |config| - config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0' + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' # You can enable the permissions needed here. For example to enable camera # permission, just remove the `#` character in front so it looks like this: # diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 480aa9e26..d79adc3fc 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -17,7 +17,7 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - DE3611AFCC1D8757ABD54D45 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DED22A9108F04B73A0DF494B /* Pods_Runner.framework */; }; + B2DADDBA7F1A0B1075AC41F8 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7727AE3B31C8FF5C2C9FAE23 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -34,10 +34,9 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 0FB76BE8B53A524C1FFEBA81 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 126E412F26AE9C35067D33BE /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 1C388EB2C3217748D62B3CB4 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 243D697823B4C3DB00BD14A7 /* SEEDS Wallet.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "SEEDS Wallet.entitlements"; sourceTree = ""; }; 24BE01FF26BD3995004DF703 /* seeds_logo_font@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "seeds_logo_font@2x.png"; sourceTree = ""; }; 24BE020126BD39D6004DF703 /* seeds_mark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "seeds_mark@2x.png"; sourceTree = ""; }; @@ -45,10 +44,11 @@ 24C2636523B472A1007B4494 /* SEEDS WalletProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "SEEDS WalletProfile.entitlements"; sourceTree = ""; }; 24CCE17E23B4AC99001456E4 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 6B837DB50D24EB9623208A65 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7727AE3B31C8FF5C2C9FAE23 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 7F4E4F1E1C477B62AB248D27 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -56,7 +56,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DED22A9108F04B73A0DF494B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C8E185BF1EEFA7F0BAC3CBF6 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -64,7 +64,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - DE3611AFCC1D8757ABD54D45 /* Pods_Runner.framework in Frameworks */, + B2DADDBA7F1A0B1075AC41F8 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -74,9 +74,9 @@ 9596D6FAAAEB03B8CB2392FB /* Pods */ = { isa = PBXGroup; children = ( - 0FB76BE8B53A524C1FFEBA81 /* Pods-Runner.debug.xcconfig */, - 1C388EB2C3217748D62B3CB4 /* Pods-Runner.release.xcconfig */, - 7F4E4F1E1C477B62AB248D27 /* Pods-Runner.profile.xcconfig */, + 6B837DB50D24EB9623208A65 /* Pods-Runner.debug.xcconfig */, + C8E185BF1EEFA7F0BAC3CBF6 /* Pods-Runner.release.xcconfig */, + 126E412F26AE9C35067D33BE /* Pods-Runner.profile.xcconfig */, ); path = Pods; sourceTree = ""; @@ -99,7 +99,7 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 9596D6FAAAEB03B8CB2392FB /* Pods */, - F9A21420F8F7E04E3ED3464A /* Frameworks */, + DDA54AB9A682EB68CA0D4B37 /* Frameworks */, ); sourceTree = ""; }; @@ -140,10 +140,10 @@ name = "Supporting Files"; sourceTree = ""; }; - F9A21420F8F7E04E3ED3464A /* Frameworks */ = { + DDA54AB9A682EB68CA0D4B37 /* Frameworks */ = { isa = PBXGroup; children = ( - DED22A9108F04B73A0DF494B /* Pods_Runner.framework */, + 7727AE3B31C8FF5C2C9FAE23 /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = ""; @@ -155,15 +155,15 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - 18C700561720CB603F1EDE2D /* [CP] Check Pods Manifest.lock */, + C1BDA00815D5A651067103C7 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 9272D8067F79F78968F47DE3 /* [CP] Embed Pods Frameworks */, - 10957BA792437ECB4E854827 /* [CP] Copy Pods Resources */, + 90C783C8B283DC412DC59B71 /* [CP] Embed Pods Frameworks */, + 1B0D20D286DBC0E0CA2FEF56 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -228,14 +228,15 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 10957BA792437ECB4E854827 /* [CP] Copy Pods Resources */ = { + 1B0D20D286DBC0E0CA2FEF56 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh", - "${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.framework/Resources/GoogleMaps.bundle", + "${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.xcframework/ios-arm64/GoogleMaps.framework/Resources/GoogleMaps.bundle", + "${PODS_ROOT}/GoogleMaps/Maps/Frameworks/GoogleMaps.xcframework/ios-arm64_x86_64-simulator/GoogleMaps.framework/Resources/GoogleMaps.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( @@ -246,34 +247,14 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 18C700561720CB603F1EDE2D /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -282,7 +263,7 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; - 9272D8067F79F78968F47DE3 /* [CP] Embed Pods Frameworks */ = { + 90C783C8B283DC412DC59B71 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -292,8 +273,11 @@ "${BUILT_PRODUCTS_DIR}/BoringSSL-GRPC/openssl_grpc.framework", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", "${BUILT_PRODUCTS_DIR}/FirebaseABTesting/FirebaseABTesting.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseAppCheckInterop/FirebaseAppCheckInterop.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseAuthInterop/FirebaseAuthInterop.framework", "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework", - "${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCoreExtension/FirebaseCoreExtension.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCoreInternal/FirebaseCoreInternal.framework", "${BUILT_PRODUCTS_DIR}/FirebaseDynamicLinks/FirebaseDynamicLinks.framework", "${BUILT_PRODUCTS_DIR}/FirebaseFirestore/FirebaseFirestore.framework", "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", @@ -303,7 +287,6 @@ "${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework", "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", - "${BUILT_PRODUCTS_DIR}/Libuv-gRPC/uv.framework", "${BUILT_PRODUCTS_DIR}/MTBBarcodeScanner/MTBBarcodeScanner.framework", "${BUILT_PRODUCTS_DIR}/PromisesObjC/FBLPromises.framework", "${BUILT_PRODUCTS_DIR}/TOCropViewController/TOCropViewController.framework", @@ -311,7 +294,7 @@ "${BUILT_PRODUCTS_DIR}/flutter_secure_storage/flutter_secure_storage.framework", "${BUILT_PRODUCTS_DIR}/gRPC-C++/grpcpp.framework", "${BUILT_PRODUCTS_DIR}/gRPC-Core/grpc.framework", - "${BUILT_PRODUCTS_DIR}/geocoding/geocoding.framework", + "${BUILT_PRODUCTS_DIR}/geocoding_ios/geocoding_ios.framework", "${BUILT_PRODUCTS_DIR}/geolocator_apple/geolocator_apple.framework", "${BUILT_PRODUCTS_DIR}/image_cropper/image_cropper.framework", "${BUILT_PRODUCTS_DIR}/image_picker_ios/image_picker_ios.framework", @@ -320,10 +303,10 @@ "${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework", "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", "${BUILT_PRODUCTS_DIR}/package_info_plus/package_info_plus.framework", - "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", + "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework", "${BUILT_PRODUCTS_DIR}/qr_code_scanner/qr_code_scanner.framework", "${BUILT_PRODUCTS_DIR}/share/share.framework", - "${BUILT_PRODUCTS_DIR}/shared_preferences_ios/shared_preferences_ios.framework", + "${BUILT_PRODUCTS_DIR}/shared_preferences_foundation/shared_preferences_foundation.framework", "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", "${BUILT_PRODUCTS_DIR}/uni_links/uni_links.framework", "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", @@ -334,8 +317,11 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl_grpc.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseABTesting.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseAppCheckInterop.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseAuthInterop.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreExtension.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreInternal.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseDynamicLinks.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseFirestore.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", @@ -345,7 +331,6 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/uv.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MTBBarcodeScanner.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBLPromises.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TOCropViewController.framework", @@ -353,7 +338,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_secure_storage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpcpp.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/grpc.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/geocoding.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/geocoding_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/geolocator_apple.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_cropper.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker_ios.framework", @@ -362,10 +347,10 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info_plus.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/qr_code_scanner.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences_foundation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/uni_links.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", @@ -378,6 +363,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -390,6 +376,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + C1BDA00815D5A651067103C7 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -491,6 +499,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -634,6 +643,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -671,6 +681,7 @@ "$(PROJECT_DIR)/Flutter", ); INFOPLIST_FILE = Runner/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 41e278650..8239de1a9 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -100,5 +100,7 @@ CADisableMinimumFrameDurationOnPhone + UIApplicationSupportsIndirectInputEvents + diff --git a/lib/blocs/deeplink/viewmodels/deeplink_bloc.dart b/lib/blocs/deeplink/viewmodels/deeplink_bloc.dart index b5bf87253..0a9a83e28 100644 --- a/lib/blocs/deeplink/viewmodels/deeplink_bloc.dart +++ b/lib/blocs/deeplink/viewmodels/deeplink_bloc.dart @@ -36,15 +36,16 @@ class DeeplinkBloc extends Bloc { } Future initDynamicLinks() async { - FirebaseDynamicLinks.instance.onLink( - onError: (error) async {}, - onSuccess: (dynamicLink) async { - final Uri? deepLink = dynamicLink?.link; - - if (deepLink != null) { - add(HandleIncomingFirebaseDeepLink(deepLink)); - } - }); + FirebaseDynamicLinks.instance.onLink.listen( + (pendingDynamicLinkData) { + // Set up the `onLink` event listener next as it may be received here + final Uri deepLink = pendingDynamicLinkData.link; + // Example of using the dynamic link to push the user to a different screen + add(HandleIncomingFirebaseDeepLink(deepLink)); + // } + }, + onError: (error) async {}, + ); final PendingDynamicLinkData? data = await FirebaseDynamicLinks.instance.getInitialLink(); final Uri? deepLink = data?.link; @@ -70,7 +71,7 @@ class DeeplinkBloc extends Bloc { add(HandleIncomingSigningRequest(uri)); } }, onError: (err) { - print("ESR Error: ${err.toString()}"); + print("ESR Error: $err"); }); } diff --git a/lib/components/qr_code_generator_widget.dart b/lib/components/qr_code_generator_widget.dart index 6f232dbca..3ab546d17 100644 --- a/lib/components/qr_code_generator_widget.dart +++ b/lib/components/qr_code_generator_widget.dart @@ -11,11 +11,10 @@ class QrCodeGeneratorWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return QrImage( + return QrImageView( data: data, size: size, backgroundColor: AppColors.white, - foregroundColor: AppColors.black, errorStateBuilder: (_, err) { return Center(child: Text(GlobalError.unknown.localizedDescription(context), textAlign: TextAlign.center)); }, diff --git a/lib/crypto/eosdart/eosdart.dart b/lib/crypto/eosdart/eosdart.dart index 543c7f059..94bc3b595 100644 --- a/lib/crypto/eosdart/eosdart.dart +++ b/lib/crypto/eosdart/eosdart.dart @@ -14,6 +14,5 @@ export 'src/models/block_header_state.dart'; export 'src/models/node_info.dart'; export 'src/models/primary_wrapper.dart'; export 'src/models/transaction.dart'; -export 'src/models/transaction.dart'; export 'src/numeric.dart'; export 'src/serialize.dart'; diff --git a/lib/crypto/eosdart/src/client.dart b/lib/crypto/eosdart/src/client.dart index 1202495d3..82ad7c1a6 100644 --- a/lib/crypto/eosdart/src/client.dart +++ b/lib/crypto/eosdart/src/client.dart @@ -222,10 +222,26 @@ class EOSClient { } /// Get Key Accounts - Future getKeyAccounts(String pubKey) async { - return _post('/history/get_key_accounts', {'public_key': pubKey}).then((accountNames) { - return AccountNames.fromJson(accountNames); - }); + // Future getKeyAccounts(String pubKey) async { + // return _post('/history/get_key_accounts', {'public_key': pubKey}).then((accountNames) { + // return AccountNames.fromJson(accountNames); + // }); + // } + + // Get Key Accounts using new API: new get_accounts_by_authorizers API + Future getAccountsByKey(String pubKey) async { + try { + return _post('/chain/get_accounts_by_authorizers', { + 'accounts': [], + 'keys': [pubKey] + }).then((response) { + final List accountNames = List.from(response['accounts'].map((e) => e['account_name'])); + return AccountNames()..accountNames = accountNames.toSet().toList(); + }); + } catch (e) { + print("getAccountsByKey error $e"); + return AccountNames(); + } } /// Push transaction to EOS chain diff --git a/lib/datasource/local/biometrics_service.dart b/lib/datasource/local/biometrics_service.dart index 914c36e39..2ddd5aca2 100644 --- a/lib/datasource/local/biometrics_service.dart +++ b/lib/datasource/local/biometrics_service.dart @@ -1,7 +1,7 @@ import 'package:flutter/services.dart' show PlatformException; import 'package:local_auth/local_auth.dart'; -import 'package:local_auth_android/types/auth_messages_android.dart'; -import 'package:local_auth_ios/types/auth_messages_ios.dart'; +import 'package:local_auth_android/local_auth_android.dart'; +import 'package:local_auth_ios/local_auth_ios.dart'; class BiometricsService { final LocalAuthentication _localAuth; diff --git a/lib/datasource/local/firebase_dynamic_link_service.dart b/lib/datasource/local/firebase_dynamic_link_service.dart index c966bfdf5..4e7b28d7c 100644 --- a/lib/datasource/local/firebase_dynamic_link_service.dart +++ b/lib/datasource/local/firebase_dynamic_link_service.dart @@ -9,11 +9,10 @@ class FirebaseDynamicLinkService { final parameters = DynamicLinkParameters( uriPrefix: domainAppUriPrefix, link: Uri.parse('$targetLink$link'), - androidParameters: AndroidParameters(packageName: androidPacakageName), - iosParameters: IosParameters(bundleId: iosBundleId, appStoreId: iosAppStoreId), + androidParameters: const AndroidParameters(packageName: androidPacakageName), + iosParameters: const IOSParameters(bundleId: iosBundleId, appStoreId: iosAppStoreId), ); - - final Uri dynamicUrl = (await parameters.buildShortLink()).shortUrl; + final dynamicUrl = (await FirebaseDynamicLinks.instance.buildShortLink(parameters)).shortUrl; return Result.value(dynamicUrl); } catch (error) { diff --git a/lib/datasource/remote/api/key_accounts_repository.dart b/lib/datasource/remote/api/key_accounts_repository.dart index 175719619..52eb0d406 100644 --- a/lib/datasource/remote/api/key_accounts_repository.dart +++ b/lib/datasource/remote/api/key_accounts_repository.dart @@ -3,18 +3,39 @@ import 'package:http/http.dart' as http; import 'package:seeds/datasource/remote/api/http_repo/http_repository.dart'; class KeyAccountsRepository extends HttpRepository { - Future> getKeyAccounts(String publicKey) { - print('[http] getKeyAccounts'); + // Future> getKeyAccounts(String publicKey) { + // print('[http] getKeyAccounts'); - final url = Uri.parse('$baseURL/v1/history/get_key_accounts'); - final body = '{ "public_key": "$publicKey" }'; + // final url = Uri.parse('$baseURL/v1/history/get_key_accounts'); + // final body = '{ "public_key": "$publicKey" }'; + + // return http + // .post(url, headers: headers, body: body) + // .then((http.Response response) => mapHttpResponse(response, (dynamic body) { + // print('result: $body'); + + // final result = List.from(body['account_names']); + + // result.sort(); + + // return result; + // })) + // .catchError((dynamic error) => mapHttpError(error)); + // } + + Future> getAccountsByKey(String publicKey) { + print('[http] getAccountsByKey'); + + final url = Uri.parse('$baseURL/v1/chain/get_accounts_by_authorizers'); + final body = '{ "accounts": [], "keys": []"$publicKey"] }'; return http .post(url, headers: headers, body: body) .then((http.Response response) => mapHttpResponse(response, (dynamic body) { print('result: $body'); - final result = List.from(body['account_names']); + final result = + List.from(body['accounts']).map((e) => e['account_name']).toList().toSet().toList(); result.sort(); diff --git a/lib/datasource/remote/firebase/firebase_remote_config.dart b/lib/datasource/remote/firebase/firebase_remote_config.dart index 5bfc7ef4f..6705052c6 100644 --- a/lib/datasource/remote/firebase/firebase_remote_config.dart +++ b/lib/datasource/remote/firebase/firebase_remote_config.dart @@ -41,7 +41,7 @@ const String _unitTestDefaultV2EndpointUrl = "https://api.telosfoundation.io"; // END - UNIT TEST CONFIG class _FirebaseRemoteConfigService { - late RemoteConfig _remoteConfig; + late FirebaseRemoteConfig _remoteConfig; factory _FirebaseRemoteConfigService() => _instance; @@ -77,7 +77,7 @@ class _FirebaseRemoteConfigService { } Future initialise() async { - _remoteConfig = RemoteConfig.instance; + _remoteConfig = FirebaseRemoteConfig.instance; await _remoteConfig.setDefaults(defaults); /// Maximum age of a cached config before it is considered stale. we set to 60 secs since we store important data. diff --git a/lib/datasource/remote/firebase/regions/firebase_database_regions_repository.dart b/lib/datasource/remote/firebase/regions/firebase_database_regions_repository.dart index 93ad92b34..4b3afa275 100644 --- a/lib/datasource/remote/firebase/regions/firebase_database_regions_repository.dart +++ b/lib/datasource/remote/firebase/regions/firebase_database_regions_repository.dart @@ -1,5 +1,5 @@ import 'package:cloud_firestore/cloud_firestore.dart'; -import 'package:geoflutterfire/geoflutterfire.dart'; +import 'package:geoflutterfire2/geoflutterfire2.dart'; import 'package:seeds/components/regions_map/interactor/view_models/place.dart'; import 'package:seeds/datasource/remote/firebase/firebase_database_repository.dart'; import 'package:seeds/datasource/remote/model/firebase_models/firebase_region_model.dart'; @@ -33,7 +33,7 @@ const messageTextKey = "messageText"; class FirebaseDatabaseRegionsRepository extends FirebaseDatabaseService { // Init firestore and geoFlutterFire - final _geo = Geoflutterfire(); + final _geo = GeoFlutterFire(); /// Create a region Future> createRegion({ diff --git a/lib/datasource/remote/model/firebase_models/region_location_model.dart b/lib/datasource/remote/model/firebase_models/region_location_model.dart index 7302bc054..32524125a 100644 --- a/lib/datasource/remote/model/firebase_models/region_location_model.dart +++ b/lib/datasource/remote/model/firebase_models/region_location_model.dart @@ -1,5 +1,5 @@ import 'package:cloud_firestore/cloud_firestore.dart'; -import 'package:geoflutterfire/geoflutterfire.dart'; +import 'package:geoflutterfire2/geoflutterfire2.dart'; class RegionLocation { final String regionAccount; @@ -21,6 +21,6 @@ class RegionLocation { ); } - double distanceTo(double lat, double lng) => geoPoint.kmDistance(lat: lat, lng: lng); + double distanceTo(double lat, double lng) => geoPoint.distance(lat: lat, lng: lng); } diff --git a/lib/datasource/remote/model/region_model.dart b/lib/datasource/remote/model/region_model.dart index 05b4d788b..4c5845b27 100644 --- a/lib/datasource/remote/model/region_model.dart +++ b/lib/datasource/remote/model/region_model.dart @@ -1,4 +1,4 @@ -import 'package:geoflutterfire/geoflutterfire.dart'; +import 'package:geoflutterfire2/geoflutterfire2.dart'; class RegionModel { final String id; @@ -28,7 +28,7 @@ class RegionModel { required this.createdAt, this.imageUrl}); - double distanceTo(double lat, double lng) => GeoFirePoint(latitude, longitude).kmDistance(lat: lat, lng: lng); + double distanceTo(double lat, double lng) => GeoFirePoint(latitude, longitude).distance(lat: lat, lng: lng); String get readableMembersCount { return membersCount > 1000 ? '${membersCount.toStringAsFixed(1)} K' : membersCount.toString(); diff --git a/lib/screens/authentication/import_key/interactor/usecases/import_key_use_case.dart b/lib/screens/authentication/import_key/interactor/usecases/import_key_use_case.dart index e54625a70..8c0432c20 100644 --- a/lib/screens/authentication/import_key/interactor/usecases/import_key_use_case.dart +++ b/lib/screens/authentication/import_key/interactor/usecases/import_key_use_case.dart @@ -7,7 +7,7 @@ class ImportKeyUseCase { final ProfileRepository _profileRepository = ProfileRepository(); Future> run(String publicKey) async { - final accountsResponse = await _keyAccountsRepository.getKeyAccounts(publicKey); + final accountsResponse = await _keyAccountsRepository.getAccountsByKey(publicKey); if (accountsResponse.isError) { final List items = [accountsResponse]; return items; diff --git a/lib/screens/profile_screens/profile/components/switch_account_bottom_sheet/interactor/usecases/import_accounts_use_case.dart b/lib/screens/profile_screens/profile/components/switch_account_bottom_sheet/interactor/usecases/import_accounts_use_case.dart index 37a7cc23c..68541301c 100644 --- a/lib/screens/profile_screens/profile/components/switch_account_bottom_sheet/interactor/usecases/import_accounts_use_case.dart +++ b/lib/screens/profile_screens/profile/components/switch_account_bottom_sheet/interactor/usecases/import_accounts_use_case.dart @@ -10,7 +10,7 @@ class ImportAccountsUseCase { Future> run(List publicKeys) async { final List> getKeyAccountsFutures = - publicKeys.map((i) => _keyAccountsRepository.getKeyAccounts(i)).toList(); + publicKeys.map((i) => _keyAccountsRepository.getAccountsByKey(i)).toList(); final List keyAccountsResponse = await Future.wait(getKeyAccountsFutures); if (keyAccountsResponse.singleWhereOrNull((i) => i.isError) != null) { diff --git a/lib/screens/profile_screens/support/interactor/usecases/get_support_data_usecase.dart b/lib/screens/profile_screens/support/interactor/usecases/get_support_data_usecase.dart index 780c73f52..9663cdd11 100644 --- a/lib/screens/profile_screens/support/interactor/usecases/get_support_data_usecase.dart +++ b/lib/screens/profile_screens/support/interactor/usecases/get_support_data_usecase.dart @@ -1,4 +1,4 @@ -import 'package:flutterfire_installations/flutterfire_installations.dart'; +import 'package:firebase_app_installations/firebase_app_installations.dart'; import 'package:package_info_plus/package_info_plus.dart'; class GetSupportDataUseCase { diff --git a/pubspec.yaml b/pubspec.yaml index 85a70297f..fef7999f6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,10 +19,10 @@ dependencies: url_launcher: ^6.1.0 step_progress_indicator: ^1.0.1 uni_links: ^0.5.1 - intl: ^0.17.0 + intl: ^0.18.0 flutter_localizations: sdk: flutter - i18n_extension: ^5.0.0 + i18n_extension: ^7.0.0 http: ^0.13.4 shared_preferences: ^2.0.9 flutter_secure_storage: ^5.0.2 @@ -30,13 +30,6 @@ dependencies: timeago: ^3.1.0 cached_network_image: ^3.2.1 flutter_svg: ^1.0.3 - firebase_dynamic_links: ^3.0.1 - firebase_messaging: ^11.1.0 - firebase_core: ^1.10.0 - firebase_storage: ^10.1.0 - cloud_firestore: ^3.1.0 - firebase_remote_config: ^0.11.0+2 - geoflutterfire: ^3.0.2 shimmer: ^2.0.0 share: ^2.0.4 image_cropper: ^2.0.3 @@ -56,13 +49,21 @@ dependencies: bs58check: ^1.0.2 pointycastle: ^3.4.0 hdkey: ^0.0.1 - package_info_plus: ^1.3.0 - flutterfire_installations: ^0.1.0 google_maps_flutter: ^2.1.1 geolocator: ^8.2.0 geocoding: ^2.0.2 permission_handler: ^9.2.0 json_schema2: ^2.0.2 + local_auth_android: ^1.0.32 + local_auth_ios: ^1.1.3 + firebase_dynamic_links: ^5.3.4 + firebase_remote_config: ^4.2.4 + firebase_storage: ^11.2.5 + cloud_firestore: ^4.8.4 + firebase_messaging: ^14.6.5 + geoflutterfire2: ^2.3.15 + firebase_app_installations: ^0.2.3+4 + package_info_plus: ^4.1.0 dev_dependencies: flutter_test: