Uh oh!
There was an error while loading. Please reload this page.
[webview_flutter_wkwebview] Fixes loadFlutterAsset exception and updates native wrapper for SecTrust and SecCertificate - #9016
Conversation
loadFlutterAsset exception and updates native wrapper for SecTrust and SecCertificateThere was a problem hiding this comment.
For future reference, I ran this in a terminal to generate this file
# Generate a private key
openssl genpkey -algorithm RSA -out test_key.pem -pkeyopt rsa_keygen_bits:2048
# Generate a Certificate Signing Request (CSR) - fill in dummy info
openssl req -new -key test_key.pem -out test_csr.pem
# Generate a self-signed certificate (e.g., valid for 5000 days) and export to DER format
openssl x509 -req -days 5000 -in test_csr.pem -signkey test_key.pem -out test_cert.der -outform DER
stuartmorgan-g
left a comment
There was a problem hiding this comment.
LGTM with small comments.
| var url: URL? = bundle.url( | ||
| forResource: (assetFilePath! as NSString).deletingPathExtension, | ||
| withExtension: (assetFilePath! as NSString).pathExtension) |
There was a problem hiding this comment.
If you use guard for the nil check on line 27, can't you avoid the force unwrap here and below?
There was a problem hiding this comment.
I tried changing line 27 to:
guard assetFilePath !=nilelse{returnnil}and I still needed the force unwrap here. Is this what you were thinking?
There was a problem hiding this comment.
I'm not @stuartmorgan-g, but you could write it as
guardlet assetFilePath else{returnnil}and then you can use the variable assetFilePath without force unwrapping it.
There was a problem hiding this comment.
For the versions of Swift we support it's still guard let assetFilePath = assetFilePath else.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…n and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016)
…n and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016)
…n and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016)
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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
…dates native wrapper for `SecTrust` and `SecCertificate` (flutter#9016) Adds support to the native wrapper to handle `SecTrust` and `SecCertificate`. This is a part of landing flutter#7893 by splitting of the native wrapper implementation. Also fixesflutter/flutter#162938 and adds an integration test for `loadFlutterAsset`. ## Pre-Review Checklist [^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.
…dates native wrapper for `SecTrust` and `SecCertificate` (flutter#9016) Adds support to the native wrapper to handle `SecTrust` and `SecCertificate`. This is a part of landing flutter#7893 by splitting of the native wrapper implementation. Also fixesflutter/flutter#162938 and adds an integration test for `loadFlutterAsset`. ## Pre-Review Checklist [^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.
…dates native wrapper for `SecTrust` and `SecCertificate` (flutter#9016) Adds support to the native wrapper to handle `SecTrust` and `SecCertificate`. This is a part of landing flutter#7893 by splitting of the native wrapper implementation. Also fixesflutter/flutter#162938 and adds an integration test for `loadFlutterAsset`. ## Pre-Review Checklist [^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.
…dates native wrapper for `SecTrust` and `SecCertificate` (flutter#9016) Adds support to the native wrapper to handle `SecTrust` and `SecCertificate`. This is a part of landing flutter#7893 by splitting of the native wrapper implementation. Also fixesflutter/flutter#162938 and adds an integration test for `loadFlutterAsset`. ## Pre-Review Checklist [^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.
flutter/packages@f26b681...2fcc403 2025-04-15 10687576+bparrishMines@users.noreply.github.com [camera_android_camerax] Updates internal API wrapper to use ProxyApis (flutter/packages#8618) 2025-04-14 stuartmorgan@google.com [tool] Run a config-only build before Xcode analyze (flutter/packages#9075) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_android] Adds internal wrapper methods for native `WebViewClient`. (flutter/packages#8964) 2025-04-14 10687576+bparrishMines@users.noreply.github.com [webview_flutter_wkwebview] Fixes `loadFlutterAsset` exception and updates native wrapper for `SecTrust` and `SecCertificate` (flutter/packages#9016) 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
…dates native wrapper for `SecTrust` and `SecCertificate` (flutter#9016) Adds support to the native wrapper to handle `SecTrust` and `SecCertificate`. This is a part of landing flutter#7893 by splitting of the native wrapper implementation. Also fixesflutter/flutter#162938 and adds an integration test for `loadFlutterAsset`. ## Pre-Review Checklist [^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.
…dates native wrapper for `SecTrust` and `SecCertificate` (flutter#9016) Adds support to the native wrapper to handle `SecTrust` and `SecCertificate`. This is a part of landing flutter#7893 by splitting of the native wrapper implementation. Also fixesflutter/flutter#162938 and adds an integration test for `loadFlutterAsset`. ## Pre-Review Checklist [^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.
Adds support to the native wrapper to handle
SecTrustandSecCertificate.This is a part of landing #7893 by splitting of the native wrapper implementation.
Also fixesflutter/flutter#162938 and adds an integration test for
loadFlutterAsset.Pre-Review Checklist
[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Footnotes
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