I am using flutter to write a simple app, everything works fine on Android, iOS, and Chrome. (I've also tested on Firefox & Brave Browser, all's well).
However, on Safari (Mac & iOS), the flutter app gets stuck on the index.html file and does not load the PWA.
The error from the console on Safari Inspect
How can I know what the anonymous function in js_helper is, or what main.dart.js:57063 refers to?
Flutter Doctor
Log from console when running on local server
Which web browsers are supported by Flutter? Flutter web apps can run on the following browsers: Chrome (mobile & desktop) Safari (mobile & desktop)
By default, flutter run compiles to debug mode. Your IDE supports this mode. Android Studio, for example, provides a Run > Debug… menu option, as well as a green bug icon overlayed with a small triangle on the project page.
You need to go to your Settings > General > Device Management. Inside Device Management, select the developer name and tap Trust “YOUR DEVELOPER NAME”. You should now be able to run your Flutter app on your local device.
debug for safari is not supported yet
but for anyone with the same problem you could solve it by running the app on release mode
flutter run -d chrome --release
after that open with the same port on safari and everything should be fine
You won't be able to debug it directly on Safari, but if you just want to test your app in safari with localHost, you can use these steps :
to run in release mode : flutter run -d chrome --release
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With