Skip to content

[webview_flutter_wkwebview] Fixes exception from native WKWebViewConfiguration.defaultWebpagePreferences sometimes returning nil #9252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented May 14, 2025

Fixes flutter/flutter#168306

WKWebViewConfiguration.defaultWebpagePreferences is an implicitly unwrapped optional and has a chance to be null, but shouldn't be.

This updates the wrapper to make it nullable.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@bparrishMines bparrishMines changed the title Wkwebview preferences [webview_flutter_wkwebview] Fixes crash from native WKWebViewConfiguration.defaultWebpagePreferences sometimes returning nil May 19, 2025
@bparrishMines bparrishMines changed the title [webview_flutter_wkwebview] Fixes crash from native WKWebViewConfiguration.defaultWebpagePreferences sometimes returning nil [webview_flutter_wkwebview] Fixes exception from native WKWebViewConfiguration.defaultWebpagePreferences sometimes returning nil May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[webview_flutter_wkwebview] Crash when restarting in debug mode on iOS – Host platform returned null value for non-null return value
1 participant