Skip to content

[webview_flutter_wkwebview] Require iOS 15 / macOS 12 and drop deprecated SecTrustGetCertificateAtIndex code path - #13294

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
jmagman:webview-wkwebview-ios-15
Oct 19, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:mainfrom
jmagman:webview-wkwebview-ios-15

Conversation

@jmagman

@jmagman jmagman commented Oct 16, 2026 •

Copy link
Copy Markdown
Member
  1. Pick up the iOS 15 minimum from the previously-updated Flutter 3.47. Remove old availability checks. This removes usage of SecTrustGetCertificateAtIndex which was deprecated in iOS 15.

  2. Also hitting deprecation 'webView(forIdentifier:withPluginRegistry:)' is deprecated: Use webView(forIdentifier:withPluginRegistrar:) instead. in FWFWebViewFlutterWKWebViewExternalAPITests. Mark the two tests as @available(*, deprecated) to suppress, and so the tests are still run since the deprecated API is public.

This wasn't showing up in CI due to flutter/flutter#194517.

Fixes flutter/flutter#194585

Pre-Review Checklist

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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

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

…ated SecTrustGetCertificateAtIndex code path
@jmagman

jmagman commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

override: no versioning needed: the webview_flutter change is README‑only

@jmagman jmagman added the override: no versioning needed Override the check requiring version bumps for most changes label Oct 16, 2026

// Overridable for testing.
internal func secTrustGetCertificateAtIndex(_ trust: SecTrust, _ ix: CFIndex) -> SecCertificate? {
return SecTrustGetCertificateAtIndex(trust, ix)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the deprecated API, it was only used in a availability fallback so remove it.

@jmagman
jmagman marked this pull request as ready for review October 16, 2026 20:33
@jmagman
jmagman requested a review from bparrishMines October 16, 2026 20:33

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the minimum supported iOS version to 15.0 and macOS version to 12.0 for the webview_flutter_wkwebview package, removing pre-iOS 15/macOS 12 fallback code paths, availability checks, and deprecated methods. Feedback on the changes points out that releasing this as a patch version (3.27.1) without updating the Dart SDK constraint or performing a major version bump will break builds for users on older Flutter versions. Additionally, a suggestion was made to simplify the copyCertificateChain method in SecTrustProxyAPIDelegate.swift using a conditional cast and map to avoid force-casting.

@jmagman
jmagman requested a review from cbracken October 16, 2026 23:38

@bparrishMines bparrishMines left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 19, 2026
@auto-submit
auto-submit Bot merged commit 1c44dbf into flutter:main Oct 19, 2026
13 checks passed
@jmagman
jmagman deleted the webview-wkwebview-ios-15 branch October 19, 2026 18:34
@mdebbar

mdebbar commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Heads up: this breaks SwiftPM builds for apps that also use google_mobile_ads. Its Package.swift still declares iOS 13 and depends on the webview-flutter-wkwebview product, so Xcode fails with:

The package product 'webview-flutter-wkwebview' requires minimum platform version 15.0 for the iOS platform, but this target supports 13.0 (in target 'google_mobile_ads' from project 'google_mobile_ads')

It took down the four Mac_ios platform_views_scroll_perf_* builders on flutter/flutter master once the pub roller picked up 3.27.1 (https://ci.chromium.org/b/8667465549370430577). I'm pinning the framework to 3.27.0 in flutter/flutter#194864 for now; the real fix needs to happen on the google_mobile_ads side (its latest release, 9.1.0, has the same iOS 13 floor).

mdebbar added a commit to mdebbar/flutter that referenced this pull request Oct 20, 2026
`webview_flutter_wkwebview` 3.27.1
(flutter/packages#13294) raised its Swift
package floor to [iOS
15](https://github.com/flutter/packages/blob/1c44dbf537a533f2abc96291e5c52f5e3cb5d691/packages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Package.swift#L12).
`google_mobile_ads` still declares [iOS
13](https://github.com/googleads/googleads-mobile-flutter/blob/ea70f22f17ed3c275e443a8d2dcbdd7fe0cf1cbf/packages/google_mobile_ads/ios/google_mobile_ads/Package.swift#L9)
and depends on the [`webview-flutter-wkwebview`
product](https://github.com/googleads/googleads-mobile-flutter/blob/ea70f22f17ed3c275e443a8d2dcbdd7fe0cf1cbf/packages/google_mobile_ads/ios/google_mobile_ads/Package.swift#L17-L24),
so SwiftPM refuses to build any app that has both.
`dev/benchmarks/platform_views_layout` is one of those apps, which took
down the four `Mac_ios platform_views_scroll_perf_*` builders since
flutter#194819:

```
Target Integrity (Xcode): The package product 'webview-flutter-wkwebview' requires minimum platform version 15.0 for the iOS platform, but this target supports 13.0
```

Example CI failures:
- https://ci.chromium.org/b/8667465549370430577
- https://ci.chromium.org/b/8667466129370978161

This pins `webview_flutter_wkwebview` to 3.27.0 until
`google_mobile_ads` raises its minimum iOS version to 15 (its latest
release, 9.1.0, still declares iOS 13).
bkonyi pushed a commit to bkonyi/flutter that referenced this pull request Oct 20, 2026
flutter/packages@10a178c...618afba

2026-10-20 [email protected] [pigeon] add version checking for
objective_c and jni dependencies (flutter/packages#13283)
2026-10-19 [email protected] [go_router_builder] Adopt
shared analyzer helpers from source_helper: ^1.4.0
(flutter/packages#13337)
2026-10-19 [email protected] [pigeon] fix instance manager test flake
(flutter/packages#13303)
2026-10-19 [email protected] [vector_graphics] Don't report a handled
loading error as unhandled (flutter/packages#13315)
2026-10-19 [email protected] [file_selector_macos] Drop deprecated
allowedFileTypes code path (flutter/packages#13302)
2026-10-19 [email protected] [shared_preferences_android] Update
androidx.datastore:datastore to 1.2.1 (flutter/packages#13334)
2026-10-19 [email protected] [in_app_purchase_storekit] Suppress
StoreKit 1 deprecation warnings (flutter/packages#13301)
2026-10-19 [email protected] [camera_avfoundation] Fix Swift analyzer
issue _captureSessionQueue (flutter/packages#13332)
2026-10-19 [email protected] [material_ui]
Unskip web tests that pass on CanvasKit and Skwasm: color_scheme_test,
elevated_button_test, filled_button_test, icon_button_test
(flutter/packages#13327)
2026-10-19 [email protected] [in_app_purchase_android] Update
to Play Billing Library 9.1.0 (flutter/packages#12781)
2026-10-19 [email protected] [webview_flutter_wkwebview] Require iOS 15
/ macOS 12 and drop deprecated SecTrustGetCertificateAtIndex code path
(flutter/packages#13294)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] 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
auto-submit Bot pushed a commit that referenced this pull request Oct 20, 2026
Revert part of #13294 that updated the iOS and macOS versions. Re-add the availability checks. Still fix the `SecTrustGetCertificateAtIndex` deprecation issue.
Due to Swift Package Manager issue flutter/flutter#194864, this broke plugins with dependencies targeting lower versions.

Unblocks flutter/flutter#194871

## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^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.
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
`webview_flutter_wkwebview` 3.27.1
(flutter/packages#13294) raised its Swift
package floor to [iOS
15](https://github.com/flutter/packages/blob/1c44dbf537a533f2abc96291e5c52f5e3cb5d691/packages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Package.swift#L12).
`google_mobile_ads` still declares [iOS
13](https://github.com/googleads/googleads-mobile-flutter/blob/ea70f22f17ed3c275e443a8d2dcbdd7fe0cf1cbf/packages/google_mobile_ads/ios/google_mobile_ads/Package.swift#L9)
and depends on the [`webview-flutter-wkwebview`
product](https://github.com/googleads/googleads-mobile-flutter/blob/ea70f22f17ed3c275e443a8d2dcbdd7fe0cf1cbf/packages/google_mobile_ads/ios/google_mobile_ads/Package.swift#L17-L24),
so SwiftPM refuses to build any app that has both.
`dev/benchmarks/platform_views_layout` is one of those apps, which took
down the four `Mac_ios platform_views_scroll_perf_*` builders since
flutter#194819:

```
Target Integrity (Xcode): The package product 'webview-flutter-wkwebview' requires minimum platform version 15.0 for the iOS platform, but this target supports 13.0
```

Example CI failures:
- https://ci.chromium.org/b/8667465549370430577
- https://ci.chromium.org/b/8667466129370978161

This pins `webview_flutter_wkwebview` to 3.27.0 until
`google_mobile_ads` raises its minimum iOS version to 15 (its latest
release, 9.1.0, still declares iOS 13).
suryaKommana2662 pushed a commit to suryaKommana2662/flutter that referenced this pull request Oct 29, 2026
flutter/packages@10a178c...618afba

2026-10-20 [email protected] [pigeon] add version checking for
objective_c and jni dependencies (flutter/packages#13283)
2026-10-19 [email protected] [go_router_builder] Adopt
shared analyzer helpers from source_helper: ^1.4.0
(flutter/packages#13337)
2026-10-19 [email protected] [pigeon] fix instance manager test flake
(flutter/packages#13303)
2026-10-19 [email protected] [vector_graphics] Don't report a handled
loading error as unhandled (flutter/packages#13315)
2026-10-19 [email protected] [file_selector_macos] Drop deprecated
allowedFileTypes code path (flutter/packages#13302)
2026-10-19 [email protected] [shared_preferences_android] Update
androidx.datastore:datastore to 1.2.1 (flutter/packages#13334)
2026-10-19 [email protected] [in_app_purchase_storekit] Suppress
StoreKit 1 deprecation warnings (flutter/packages#13301)
2026-10-19 [email protected] [camera_avfoundation] Fix Swift analyzer
issue _captureSessionQueue (flutter/packages#13332)
2026-10-19 [email protected] [material_ui]
Unskip web tests that pass on CanvasKit and Skwasm: color_scheme_test,
elevated_button_test, filled_button_test, icon_button_test
(flutter/packages#13327)
2026-10-19 [email protected] [in_app_purchase_android] Update
to Play Billing Library 9.1.0 (flutter/packages#12781)
2026-10-19 [email protected] [webview_flutter_wkwebview] Require iOS 15
/ macOS 12 and drop deprecated SecTrustGetCertificateAtIndex code path
(flutter/packages#13294)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD override: no versioning needed Override the check requiring version bumps for most changes p: webview_flutter platform-ios platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

webview_flutter_wkwebview webView(forIdentifier:withPluginRegistry:) deprecation warnings

3 participants