Revert "[webview_flutter_wkwebview] Tear down ProxyAPIRegistrar in applicationWillTerminate"#11564
Conversation
…pplicati…" This reverts commit 9391572.
There was a problem hiding this comment.
Code Review
This pull request reverts the changes from version 3.24.4, downgrading the package to 3.24.3. The changes include removing application and scene lifecycle delegates, deleting unit tests, and reverting Xcode project settings. Review feedback identifies a potential orphaned file (PlatformViewImplTests.swift) and recommends using optional chaining instead of force unwrapping for proxyApiRegistrar to avoid runtime crashes.
| 8F1488FF2D2DE27000191744 /* NavigationActionProxyAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F1488CB2D2DE27000191744 /* NavigationActionProxyAPITests.swift */; }; | ||
| 8F1489012D2DE91C00191744 /* AuthenticationChallengeResponseProxyAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F1489002D2DE91C00191744 /* AuthenticationChallengeResponseProxyAPITests.swift */; }; | ||
| 8F63D06B2F8812E400EC5076 /* WebViewFlutterPluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F63D06A2F8812E400EC5076 /* WebViewFlutterPluginTests.swift */; }; | ||
| 8F63D06C2F8812E400EC5076 /* PlatformViewImplTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F63D0692F8812E400EC5076 /* PlatformViewImplTests.swift */; }; |
There was a problem hiding this comment.
The reference to PlatformViewImplTests.swift is being removed from the Xcode project, but the file itself is not included in the deletion list of this pull request. This will result in an orphaned file in the repository. Please ensure that all files associated with the reverted change are physically deleted.
| proxyApiRegistrar!.ignoreCallsToDart = true | ||
| proxyApiRegistrar!.tearDown() |
There was a problem hiding this comment.
The use of force unwrapping (!) on proxyApiRegistrar is unsafe. If detachFromEngine is called when proxyApiRegistrar is already nil, the application will crash. It is safer to use optional chaining (?), which was the pattern used in the code being reverted.
| proxyApiRegistrar!.ignoreCallsToDart = true | |
| proxyApiRegistrar!.tearDown() | |
| proxyApiRegistrar?.ignoreCallsToDart = true | |
| proxyApiRegistrar?.tearDown() |
|
@stuartmorgan-g I was confused by flutter/flutter#185407 (comment). Should this PR publish a new version of |
Yes, that's the cleanest way to give people who were broken by 3.24.4 a path to being fixed, since then they don't need to downgrade, just upgrade. |
…r#185536) flutter/packages@4a2091d...8400f71 2026-04-23 14008334+moepanda@users.noreply.github.com [Animations] Add support for custom shadows to OpenContainer (flutter#62475) (flutter/packages#11401) 2026-04-23 engine-flutter-autoroll@skia.org Roll Flutter from 3d0e822 to 5e4f169 (24 revisions) (flutter/packages#11565) 2026-04-22 10687576+bparrishMines@users.noreply.github.com Revert "[webview_flutter_wkwebview] Tear down ProxyAPIRegistrar in `applicationWillTerminate`" (flutter/packages#11564) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC flutter-ecosystem@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Reverts #11484
Fixes flutter/flutter#185407