plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[battery_plus]: Couldn't get battery info on iOS simulator

Open tomgly opened this issue 1 year ago • 0 comments

What is your question?

  1. Clone the sample app from here https://github.com/fluttercommunity/plus_plugins/tree/main/packages/battery_plus/battery_plus
  2. Run the app on a iPhone 15 Pro(iOS 17.5) simulator
  3. I got the following error
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(UNAVAILABLE, Battery info unavailable, null, null)
Simulator Screenshot - iPhone 15 Pro

How can I fix this problem?

flutter doctor

[✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-arm64, locale
    en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.89.1)
[✓] Connected device (6 available)
[✓] Network resources

• No issues found!

Checklist before submitting a question

  • [X] I searched issues in this repository and couldn't find such bug/problem
  • [X] I Google'd a solution and I couldn't find it
  • [X] I searched on StackOverflow for a solution and I couldn't find it
  • [X] I read the README.md file of the plugin
  • [X] I am using the latest version of the plugin
  • [X] All dependencies are up to date with flutter pub upgrade
  • [X] I did a flutter clean
  • [X] I tried running the example project

tomgly avatar Jun 01 '24 02:06 tomgly