mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-05-11 01:12:15 +00:00
patch: running android related code on other platforms
This commit is contained in:
parent
10294e088a
commit
d86c501fc5
6 changed files with 39 additions and 24 deletions
ios
lib
scripts
|
@ -1,7 +1,6 @@
|
|||
PODS:
|
||||
- connectivity_plus (0.0.1):
|
||||
- Flutter
|
||||
- ReachabilitySwift
|
||||
- CryptoSwift (1.8.4)
|
||||
- cw_decred (0.0.1):
|
||||
- Flutter
|
||||
|
@ -59,6 +58,8 @@ PODS:
|
|||
- OrderedSet (~> 6.0.3)
|
||||
- flutter_local_authentication (1.2.0):
|
||||
- Flutter
|
||||
- flutter_local_notifications (0.0.1):
|
||||
- Flutter
|
||||
- flutter_mailer (0.0.1):
|
||||
- Flutter
|
||||
- flutter_secure_storage (6.0.0):
|
||||
|
@ -77,7 +78,9 @@ PODS:
|
|||
- FlutterMacOS
|
||||
- permission_handler_apple (9.3.0):
|
||||
- Flutter
|
||||
- ReachabilitySwift (5.2.4)
|
||||
- reown_yttrium (0.0.1):
|
||||
- Flutter
|
||||
- YttriumWrapper (= 0.8.35)
|
||||
- SDWebImage (5.20.0):
|
||||
- SDWebImage/Core (= 5.20.0)
|
||||
- SDWebImage/Core (5.20.0)
|
||||
|
@ -100,6 +103,7 @@ PODS:
|
|||
- Flutter
|
||||
- wakelock_plus (0.0.1):
|
||||
- Flutter
|
||||
- YttriumWrapper (0.8.35)
|
||||
|
||||
DEPENDENCIES:
|
||||
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
|
||||
|
@ -114,6 +118,7 @@ DEPENDENCIES:
|
|||
- Flutter (from `Flutter`)
|
||||
- flutter_inappwebview_ios (from `.symlinks/plugins/flutter_inappwebview_ios/ios`)
|
||||
- flutter_local_authentication (from `.symlinks/plugins/flutter_local_authentication/ios`)
|
||||
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
|
||||
- flutter_mailer (from `.symlinks/plugins/flutter_mailer/ios`)
|
||||
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
|
||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
|
||||
|
@ -122,6 +127,7 @@ DEPENDENCIES:
|
|||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
|
||||
- reown_yttrium (from `.symlinks/plugins/reown_yttrium/ios`)
|
||||
- sensitive_clipboard (from `.symlinks/plugins/sensitive_clipboard/ios`)
|
||||
- share_plus (from `.symlinks/plugins/share_plus/ios`)
|
||||
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||
|
@ -137,9 +143,9 @@ SPEC REPOS:
|
|||
- DKImagePickerController
|
||||
- DKPhotoGallery
|
||||
- OrderedSet
|
||||
- ReachabilitySwift
|
||||
- SDWebImage
|
||||
- SwiftyGif
|
||||
- YttriumWrapper
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
connectivity_plus:
|
||||
|
@ -164,6 +170,8 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/flutter_inappwebview_ios/ios"
|
||||
flutter_local_authentication:
|
||||
:path: ".symlinks/plugins/flutter_local_authentication/ios"
|
||||
flutter_local_notifications:
|
||||
:path: ".symlinks/plugins/flutter_local_notifications/ios"
|
||||
flutter_mailer:
|
||||
:path: ".symlinks/plugins/flutter_mailer/ios"
|
||||
flutter_secure_storage:
|
||||
|
@ -180,6 +188,8 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/path_provider_foundation/darwin"
|
||||
permission_handler_apple:
|
||||
:path: ".symlinks/plugins/permission_handler_apple/ios"
|
||||
reown_yttrium:
|
||||
:path: ".symlinks/plugins/reown_yttrium/ios"
|
||||
sensitive_clipboard:
|
||||
:path: ".symlinks/plugins/sensitive_clipboard/ios"
|
||||
share_plus:
|
||||
|
@ -198,7 +208,7 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/wakelock_plus/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
|
||||
connectivity_plus: 2a701ffec2c0ae28a48cf7540e279787e77c447d
|
||||
CryptoSwift: e64e11850ede528a02a0f3e768cec8e9d92ecb90
|
||||
cw_decred: 9c0e1df74745b51a1289ec5e91fb9e24b68fa14a
|
||||
cw_mweb: 22cd01dfb8ad2d39b15332006f22046aaa8352a3
|
||||
|
@ -212,6 +222,7 @@ SPEC CHECKSUMS:
|
|||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
|
||||
flutter_local_authentication: 1172a4dd88f6306dadce067454e2c4caf07977bb
|
||||
flutter_local_notifications: ff50f8405aaa0ccdc7dcfb9022ca192e8ad9688f
|
||||
flutter_mailer: 2ef5a67087bc8c6c4cefd04a178bf1ae2c94cd83
|
||||
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
|
||||
fluttertoast: 21eecd6935e7064cc1fcb733a4c5a428f3f24f0f
|
||||
|
@ -221,7 +232,7 @@ SPEC CHECKSUMS:
|
|||
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
|
||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||
ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda
|
||||
reown_yttrium: c0e87e5965fa60a3559564cc35cffbba22976089
|
||||
SDWebImage: 73c6079366fea25fa4bb9640d5fb58f0893facd8
|
||||
sensitive_clipboard: d4866e5d176581536c27bb1618642ee83adca986
|
||||
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
|
||||
|
@ -231,8 +242,9 @@ SPEC CHECKSUMS:
|
|||
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
|
||||
universal_ble: cf52a7b3fd2e7c14d6d7262e9fdadb72ab6b88a6
|
||||
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||
wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56
|
||||
wakelock_plus: 76957ab028e12bfa4e66813c99e46637f367fc7e
|
||||
YttriumWrapper: 31e937fe9fbe0f1314d2ca6be9ce9b379a059966
|
||||
|
||||
PODFILE CHECKSUM: e448f662d4c41f0c0b1ccbb78afd57dbf895a597
|
||||
PODFILE CHECKSUM: 5296465b1c6d14d506230356756826012f65d97a
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
|
|
@ -230,6 +230,8 @@ class ExceptionHandler {
|
|||
static Future<void> _addDeviceInfo(File file) async {
|
||||
final packageInfo = await PackageInfo.fromPlatform();
|
||||
final currentVersion = packageInfo.version;
|
||||
final appName = packageInfo.appName;
|
||||
final package = packageInfo.packageName;
|
||||
|
||||
final deviceInfoPlugin = DeviceInfoPlugin();
|
||||
Map<String, dynamic> deviceInfo = {};
|
||||
|
@ -252,7 +254,7 @@ class ExceptionHandler {
|
|||
}
|
||||
|
||||
await file.writeAsString(
|
||||
"App Version: $currentVersion\n\nDevice Info $deviceInfo\n\n",
|
||||
"App Version: $currentVersion\nApp Name: $appName\nPackage: $package\n\nDevice Info $deviceInfo\n\n",
|
||||
mode: FileMode.append,
|
||||
);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,6 @@ import 'dart:io' show Platform;
|
|||
|
||||
import 'package:cake_wallet/.secrets.g.dart' as secrets;
|
||||
import 'package:cake_wallet/bitcoin/bitcoin.dart';
|
||||
import 'package:cake_wallet/core/background_sync.dart';
|
||||
import 'package:cake_wallet/core/key_service.dart';
|
||||
import 'package:cake_wallet/entities/auto_generate_subaddress_status.dart';
|
||||
import 'package:cake_wallet/entities/balance_display_mode.dart';
|
||||
|
@ -538,7 +537,8 @@ abstract class DashboardViewModelBase with Store {
|
|||
}
|
||||
|
||||
@observable
|
||||
late bool backgroundSyncNotificationsEnabled = sharedPreferences.getBool(PreferencesKey.backgroundSyncNotificationsEnabled) ?? false;
|
||||
late bool backgroundSyncNotificationsEnabled =
|
||||
sharedPreferences.getBool(PreferencesKey.backgroundSyncNotificationsEnabled) ?? false;
|
||||
|
||||
@action
|
||||
Future<void> setBackgroundSyncNotificationsEnabled(bool value) async {
|
||||
|
@ -558,7 +558,6 @@ abstract class DashboardViewModelBase with Store {
|
|||
await sharedPreferences.setBool(PreferencesKey.backgroundSyncNotificationsEnabled, value);
|
||||
}
|
||||
|
||||
|
||||
bool get hasBgsyncNetworkConstraints => Platform.isAndroid;
|
||||
bool get hasBgsyncBatteryNotLowConstraints => Platform.isAndroid;
|
||||
bool get hasBgsyncChargingConstraints => Platform.isAndroid;
|
||||
|
@ -575,12 +574,14 @@ abstract class DashboardViewModelBase with Store {
|
|||
|
||||
@observable
|
||||
bool backgroundSyncDeviceIdle = false;
|
||||
|
||||
|
||||
Future<void> _loadConstraints() async {
|
||||
backgroundSyncNetworkUnmetered = await FlutterDaemon().getNetworkType();
|
||||
backgroundSyncBatteryNotLow = await FlutterDaemon().getBatteryNotLow();
|
||||
backgroundSyncCharging = await FlutterDaemon().getRequiresCharging();
|
||||
backgroundSyncDeviceIdle = await FlutterDaemon().getDeviceIdle();
|
||||
if (Platform.isAndroid) {
|
||||
backgroundSyncNetworkUnmetered = await FlutterDaemon().getNetworkType();
|
||||
backgroundSyncBatteryNotLow = await FlutterDaemon().getBatteryNotLow();
|
||||
backgroundSyncCharging = await FlutterDaemon().getRequiresCharging();
|
||||
backgroundSyncDeviceIdle = await FlutterDaemon().getDeviceIdle();
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
|
@ -618,7 +619,7 @@ abstract class DashboardViewModelBase with Store {
|
|||
await enableBackgroundSync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool get hasBatteryOptimization => Platform.isAndroid;
|
||||
|
||||
@observable
|
||||
|
|
|
@ -12,13 +12,13 @@ TYPES=($MONERO_COM $CAKEWALLET)
|
|||
APP_IOS_TYPE=$1
|
||||
|
||||
MONERO_COM_NAME="Monero.com"
|
||||
MONERO_COM_VERSION="4.27.0"
|
||||
MONERO_COM_BUILD_NUMBER=118
|
||||
MONERO_COM_VERSION="4.27.1"
|
||||
MONERO_COM_BUILD_NUMBER=120
|
||||
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
|
||||
|
||||
CAKEWALLET_NAME="Cake Wallet"
|
||||
CAKEWALLET_VERSION="4.27.0"
|
||||
CAKEWALLET_BUILD_NUMBER=313
|
||||
CAKEWALLET_VERSION="4.27.1"
|
||||
CAKEWALLET_BUILD_NUMBER=314
|
||||
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ fi
|
|||
|
||||
CAKEWALLET_NAME="Cake Wallet"
|
||||
CAKEWALLET_VERSION="4.27.0"
|
||||
CAKEWALLET_BUILD_NUMBER=53
|
||||
CAKEWALLET_BUILD_NUMBER=54
|
||||
|
||||
if ! [[ " ${TYPES[*]} " =~ " ${APP_LINUX_TYPE} " ]]; then
|
||||
echo "Wrong app type."
|
||||
|
|
|
@ -17,12 +17,12 @@ fi
|
|||
|
||||
MONERO_COM_NAME="Monero.com"
|
||||
MONERO_COM_VERSION="4.27.0"
|
||||
MONERO_COM_BUILD_NUMBER=50
|
||||
MONERO_COM_BUILD_NUMBER=51
|
||||
MONERO_COM_BUNDLE_ID="com.cakewallet.monero"
|
||||
|
||||
CAKEWALLET_NAME="Cake Wallet"
|
||||
CAKEWALLET_VERSION="4.27.0"
|
||||
CAKEWALLET_BUILD_NUMBER=112
|
||||
CAKEWALLET_BUILD_NUMBER=113
|
||||
CAKEWALLET_BUNDLE_ID="com.fotolockr.cakewallet"
|
||||
|
||||
if ! [[ " ${TYPES[*]} " =~ " ${APP_MACOS_TYPE} " ]]; then
|
||||
|
|
Loading…
Reference in a new issue