6

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?

Muhammad Rafay
  • 133
  • 3
  • 7

1 Answers1

0

One thing to check as well (ideally in Xcode) - make sure the deployment targets/ios versions are the same. Check under podfile (if uncommented at top) and AppFrameWorkInfo(in Xcode) (at the bottom - minimumOSVersion), as well as Project -> Runner -> Info -> Deployment Target

  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/31975978) – nvidot Jun 13 '22 at 15:42