From 7c83579e7413ef4bcc09a8621a0f336faa05477b Mon Sep 17 00:00:00 2001 From: Codel1417 Date: Mon, 13 May 2024 20:49:01 -0400 Subject: [PATCH] Fixes for IOS & battery reporting --- ios/Podfile.lock | 74 +++++++++---------- .../Bluetooth/bluetooth_manager_plus.dart | 4 +- pubspec.lock | 4 +- 3 files changed, 37 insertions(+), 45 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 76178a19..05e9308d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -39,19 +39,19 @@ PODS: - file_picker (0.0.1): - DKImagePickerController/PhotoGallery - Flutter - - Firebase/CoreOnly (10.24.0): - - FirebaseCore (= 10.24.0) - - Firebase/Messaging (10.24.0): + - Firebase/CoreOnly (10.25.0): + - FirebaseCore (= 10.25.0) + - Firebase/Messaging (10.25.0): - Firebase/CoreOnly - - FirebaseMessaging (~> 10.24.0) - - firebase_core (2.30.1): - - Firebase/CoreOnly (= 10.24.0) + - FirebaseMessaging (~> 10.25.0) + - firebase_core (2.31.0): + - Firebase/CoreOnly (= 10.25.0) - Flutter - - firebase_messaging (14.9.1): - - Firebase/Messaging (= 10.24.0) + - firebase_messaging (14.9.2): + - Firebase/Messaging (= 10.25.0) - firebase_core - Flutter - - FirebaseCore (10.24.0): + - FirebaseCore (10.25.0): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.12) - GoogleUtilities/Logger (~> 7.12) @@ -62,7 +62,7 @@ PODS: - GoogleUtilities/Environment (~> 7.8) - GoogleUtilities/UserDefaults (~> 7.8) - PromisesObjC (~> 2.1) - - FirebaseMessaging (10.24.0): + - FirebaseMessaging (10.25.0): - FirebaseCore (~> 10.0) - FirebaseInstallations (~> 10.0) - GoogleDataTransport (~> 9.3) @@ -72,6 +72,8 @@ PODS: - GoogleUtilities/UserDefaults (~> 7.8) - nanopb (< 2.30911.0, >= 2.30908.0) - Flutter (1.0.0) + - flutter_blue_plus (0.0.1): + - Flutter - flutter_keyboard_visibility (0.0.1): - Flutter - flutter_local_notifications (0.0.1): @@ -85,29 +87,29 @@ PODS: - GoogleUtilities/Environment (~> 7.7) - nanopb (< 2.30911.0, >= 2.30908.0) - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/AppDelegateSwizzler (7.13.2): + - GoogleUtilities/AppDelegateSwizzler (7.13.3): - GoogleUtilities/Environment - GoogleUtilities/Logger - GoogleUtilities/Network - GoogleUtilities/Privacy - - GoogleUtilities/Environment (7.13.2): + - GoogleUtilities/Environment (7.13.3): - GoogleUtilities/Privacy - PromisesObjC (< 3.0, >= 1.2) - - GoogleUtilities/Logger (7.13.2): + - GoogleUtilities/Logger (7.13.3): - GoogleUtilities/Environment - GoogleUtilities/Privacy - - GoogleUtilities/Network (7.13.2): + - GoogleUtilities/Network (7.13.3): - GoogleUtilities/Logger - "GoogleUtilities/NSData+zlib" - GoogleUtilities/Privacy - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (7.13.2)": + - "GoogleUtilities/NSData+zlib (7.13.3)": - GoogleUtilities/Privacy - - GoogleUtilities/Privacy (7.13.2) - - GoogleUtilities/Reachability (7.13.2): + - GoogleUtilities/Privacy (7.13.3) + - GoogleUtilities/Reachability (7.13.3): - GoogleUtilities/Logger - GoogleUtilities/Privacy - - GoogleUtilities/UserDefaults (7.13.2): + - GoogleUtilities/UserDefaults (7.13.3): - GoogleUtilities/Logger - GoogleUtilities/Privacy - in_app_review (0.2.0): @@ -133,13 +135,8 @@ PODS: - permission_handler_apple (9.3.0): - Flutter - PromisesObjC (2.4.0) - - Protobuf (3.26.1) - proximity_sensor (0.0.1): - Flutter - - reactive_ble_mobile (0.0.1): - - Flutter - - Protobuf (~> 3.5) - - SwiftProtobuf (~> 1.0) - SDWebImage (5.19.1): - SDWebImage/Core (= 5.19.1) - SDWebImage/Core (5.19.1) @@ -153,7 +150,6 @@ PODS: - shared_preferences_foundation (0.0.1): - Flutter - FlutterMacOS - - SwiftProtobuf (1.26.0) - SwiftyGif (5.4.5) - Toast (4.1.1) - url_launcher_ios (0.0.1): @@ -169,6 +165,7 @@ DEPENDENCIES: - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_messaging (from `.symlinks/plugins/firebase_messaging/ios`) - Flutter (from `Flutter`) + - flutter_blue_plus (from `.symlinks/plugins/flutter_blue_plus/ios`) - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`) - flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`) @@ -182,7 +179,6 @@ DEPENDENCIES: - pedometer (from `.symlinks/plugins/pedometer/ios`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - proximity_sensor (from `.symlinks/plugins/proximity_sensor/ios`) - - reactive_ble_mobile (from `.symlinks/plugins/reactive_ble_mobile/ios`) - sensors_plus (from `.symlinks/plugins/sensors_plus/ios`) - sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) @@ -202,10 +198,8 @@ SPEC REPOS: - GoogleUtilities - nanopb - PromisesObjC - - Protobuf - SDWebImage - Sentry - - SwiftProtobuf - SwiftyGif - Toast @@ -224,6 +218,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/firebase_messaging/ios" Flutter: :path: Flutter + flutter_blue_plus: + :path: ".symlinks/plugins/flutter_blue_plus/ios" flutter_keyboard_visibility: :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" flutter_local_notifications: @@ -250,8 +246,6 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/permission_handler_apple/ios" proximity_sensor: :path: ".symlinks/plugins/proximity_sensor/ios" - reactive_ble_mobile: - :path: ".symlinks/plugins/reactive_ble_mobile/ios" sensors_plus: :path: ".symlinks/plugins/sensors_plus/ios" sentry_flutter: @@ -270,42 +264,40 @@ SPEC CHECKSUMS: DKImagePickerController: a7836546cfdfe014171694f643a7d575bc8ace7f DKPhotoGallery: acbd8a3bab19cf6e5fe64a853fc07bfbd247a8f6 file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655 - Firebase: 91fefd38712feb9186ea8996af6cbdef41473442 - firebase_core: 7f1e1156934d0da3be260174812842df9420e4ab - firebase_messaging: 28b49260e70d10042fa2bea79f37e1edae48f1bd - FirebaseCore: 11dc8a16dfb7c5e3c3f45ba0e191a33ac4f50894 + Firebase: 0312a2352584f782ea56f66d91606891d4607f06 + firebase_core: 0b39f4f424e02eecabb2356ddf331fa07b772af8 + firebase_messaging: 8999827b6efc9c3ab4b1f9dc246deaa7f13dbf88 + FirebaseCore: 7ec4d0484817f12c3373955bc87762d96842d483 FirebaseCoreInternal: 910a81992c33715fec9263ca7381d59ab3a750b7 FirebaseInstallations: 91950fe859846fff0fbd296180909dd273103b09 - FirebaseMessaging: 4d52717dd820707cc4eadec5eb981b4832ec8d5d + FirebaseMessaging: 88950ba9485052891ebe26f6c43a52bb62248952 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + flutter_blue_plus: 4837da7d00cf5d441fdd6635b3a57f936778ea96 flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 flutter_local_notifications: 4cde75091f6327eb8517fa068a0a5950212d2086 flutter_native_splash: edf599c81f74d093a4daf8e17bd7a018854bc778 fluttertoast: 9f2f8e81bb5ce18facb9748d7855bf5a756fe3db GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a - GoogleUtilities: c56430aef51a1aa57b25da78c3f8397e522c67b7 + GoogleUtilities: ea963c370a38a8069cc5f7ba4ca849a60b6d7d15 in_app_review: 318597b3a06c22bb46dc454d56828c85f444f99d install_referrer: 1bde9acf8b1bfd372706454234444a01b5732bcf integration_test: 13825b8a9334a850581300559b8839134b124670 nanopb: 438bc412db1928dac798aa6fd75726007be04262 package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c - path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 pdfx: 7b876b09de8b7a0bf444a4f82b439ffcff4ee1ec pedometer: 381969883680ade42559782cc41a3bbd453d8234 permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 - Protobuf: a53f5173a603075b3522a5c50be63a67a5f3353a proximity_sensor: 87bc974f9d94b03b4b5911ff1f93a61e561e6183 - reactive_ble_mobile: 9ce6723d37ccf701dbffd202d487f23f5de03b4c SDWebImage: 40b0b4053e36c660a764958bff99eed16610acbb sensors_plus: 18a9b346c43e157da17d2c8e99def703f9efb9d8 Sentry: cd86fc55628f5b7c572cabe66cc8f95a9d2f165a sentry_flutter: ca7760fc008dc3bc2981730dc0c1d2f892178370 - shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695 - SwiftProtobuf: 5e8349171e7c2f88f5b9e683cb3cb79d1dc780b3 + shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78 SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4 Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e - url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586 + url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1 PODFILE CHECKSUM: f9d9cd7f72d22327c1a52573bad03d16adcc3ac4 diff --git a/lib/Backend/Bluetooth/bluetooth_manager_plus.dart b/lib/Backend/Bluetooth/bluetooth_manager_plus.dart index 92843b4d..1d589e65 100644 --- a/lib/Backend/Bluetooth/bluetooth_manager_plus.dart +++ b/lib/Backend/Bluetooth/bluetooth_manager_plus.dart @@ -43,7 +43,7 @@ ValueNotifier isBluetoothEnabled = ValueNotifier(false); @Riverpod(keepAlive: true) Future initFlutterBluePlus(InitFlutterBluePlusRef ref) async { - await FlutterBluePlus.setLogLevel(LogLevel.verbose, color: true); + await FlutterBluePlus.setLogLevel(LogLevel.verbose, color: false); // first, check if bluetooth is supported by your hardware // Note: The platform is initialized on the first call to any FlutterBluePlus method. if (await FlutterBluePlus.isSupported == false) { @@ -215,7 +215,7 @@ Future initFlutterBluePlus(InitFlutterBluePlusRef ref) async { BaseStatefulDevice? statefulDevice = ref.read(knownDevicesProvider)[bluetoothDevice.remoteId.str]; // get Device object // set value - if (bluetoothCharacteristic.characteristicUuid == Guid("00002a19-0000-1000-8000-00805f9b34fb")) { + if (bluetoothCharacteristic.characteristicUuid == Guid("0x2A19")) { statefulDevice?.batteryLevel.value == values.first; statefulDevice?.batlevels.add(FlSpot(statefulDevice.stopWatch.elapsed.inSeconds.toDouble(), values.first.toDouble())); } diff --git a/pubspec.lock b/pubspec.lock index 93e46710..cc0e925c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -996,10 +996,10 @@ packages: dependency: "direct main" description: name: lottie - sha256: ce2bb2605753915080e4ee47f036a64228c88dc7f56f7bc1dbe912d75b55b1e2 + sha256: "46def1e76c4fbfd4643e823980112cfe94a2ba1d9152fe54701c0bf30be4f4cd" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" matcher: dependency: transitive description: