cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
527 stars 625 forks source link

[Health 10.2.0] When using configure(useHealthConnectIfAvailable: true) before calling runApp(), iOS shows a blank white screen #989

Open bps-takumaodaki opened 6 days ago

bps-takumaodaki commented 6 days ago

Device / Emulator and OS

Device: iPhone SE2 (iOS 17.5.1)

Describe the Bug

When executing Health().configure(useHealthConnectIfAvailable: true) before runApp on iOS, the app starts with a blank white screen.

Steps to Reproduce

  1. Change the main function of the example app to the following:
void main() => runApp(HealthApp());

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Health().configure(useHealthConnectIfAvailable: true);
  runApp(HealthApp());
}
  1. Launch the app on an iOS device.

Result: The app starts with a blank white screen.

Screenshots

https://github.com/cph-cachet/flutter-plugins/assets/111839744/a2eb4de3-d2aa-4628-a1bc-e1b154b839d1

Additional Information

When useHealthConnectIfAvailable is set to true, a Method Channel API that is not implemented on the iOS side is being called.