I'm using the webview_flutter package in my Flutter app to display a webpage when a button is pressed. Everything works as expected in the Xcode iOS simulator and when I run the app on a physical device through Xcode (with debug mode), but when I use flutter run --release to release the app onto the device, the WebView shows only a gray screen and nothing loads. In other words:
1): The WebView loads fine in both the simulator and the physical device in debug mode.
2): The issue (grey screen; not loading) only occurs when running the app in release mode (flutter run --release).
I've tried troubleshooting the following:
1): Rebuilding the app (flutter clean, then flutter run --release).
2): Checking for any errors or logs, but none seem to show up related to the WebView issue in the release build.
Why does the WebView fail to load in release mode on the iOS device, and how can I fix it? Any help is greatly appreciated!
iOS version: 18.0.1
Flutter version: 3.22.2
Xcode version: 16.0
macOS version: 15.0