5
votes

I am trying to run a flutter app on iOS devices after creating a release build. Every time I run the app it gets stuck on the splash screen. This only happens on a real device and the app runs fine with the simulator. I have already tried adding

  WidgetsFlutterBinding.ensureInitialized();

in main.dart file as I was getting Unhandled Exception: NoSuchMethodError: The getter 'defaultBinaryMessenger' was called on null. but it didn't help. Also tried everything described here Flutter app opens, but is stuck on splash-screen

Would love to know if anyone has any ideas?

1
Have you tried this answer? - Minato
Can you share some code through which this can be reproduced? - Waleed Arshad

1 Answers

-1
votes

If the app runs fine in an iOS simulator, try running flutter clean to rebuild the auto-generated iOS project in the Flutter project. You can also verify if running the release build on iOS simulator works without issues.