advanced_webview 0.2.0
advanced_webview: ^0.2.0 copied to clipboard
A lean, type-safe WebView plugin for Android and iOS built on Pigeon.
Changelog #
All notable changes to this project are documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased #
0.2.0 - 2026-11-01 #
-
Add
AdvancedWebViewController.onSslErrorandonHttpAuthRequest(SslError,SslErrorDecision,HttpAuthRequest,HttpAuthCredentials). Certificate errors are still refused unless the callback returnsproceed; HTTP authentication is cancelled unless the callback returns credentials. -
Add
AdvancedWebViewController.onDownloadStartandDownloadRequest: the WebView reports downloads (attachments, files it cannot show,downloadlinks) instead of saving them, so the app decides how to fetch the file. Android usesWebView.setDownloadListener; iOS cancels theWKNavigationResponse/WKNavigationActionand reports it. -
Add
AdvancedWebViewController.onPermissionRequestto decide whether a page may use the camera, microphone or location (PermissionRequest,PermissionResource,PermissionDecision). Without a callback every request is denied. On Android the plugin also asks for the runtime permission after you grant; geolocation is Android only because WebKit has no delegate for it. -
Add JavaScript handlers with return values: the
javaScriptHandlersconstructor parameter andwindow.advanced_webview.callHandler(name, ...args), which returns a promise settled with the Dart handler's result (or rejected when it throws). The global iswindow.advanced_webviewby default;javaScriptHandlerObjectNamerenames it. Android needsWEB_MESSAGE_LISTENER.
0.1.0 - 2026-10-31 #
First release on pub.dev.
- Raise the minimum Flutter SDK to 3.47.8 (Dart 3.13.7), the version the plugin is built and tested with.
- Android: disabling
passkeysEnablednow resets WebAuthn support after it was enabled. - iOS:
getCookiesmatches cookie paths at slash boundaries instead of arbitrary prefixes. - Clarify navigation and JavaScript channel trust boundaries in English and Japanese, and document app setup requirements.
- Add
WebViewSettings.passkeysEnabledto enable WebAuthn / passkeys on Android (WebSettingsCompat.setWebAuthenticationSupport). iOS needs no setting; the app must have the Associated Domainswebcredentialsentitlement. - Android:
<input type="file">now opens the system file picker (it did nothing before). iOS already used WebKit's built-in picker. - Add
AdvancedWebViewController.onNewWindowforwindow.openandtarget="_blank". Without it, the URL now loads in the same WebView on both platforms (previously nothing happened on iOS). - CI: lock GitHub Actions dependencies with
gh actions-lock(.github/workflows/actions.lockpins every action, including transitive ones, to a commit SHA), verify it in the newverify-lockfileworkflow, and reference actions by exact release tag. - Add user scripts:
UserScript, theuserScriptsconstructor parameter, andAdvancedWebViewController.addUserScript/removeAllUserScripts. Android usesandroidx.webkit(DOCUMENT_START_SCRIPT). - Add cookie management:
AdvancedWebViewController.setCookie,getCookiesandclearCookieswith theWebViewCookietype. On AndroidgetCookiesonly reports name and value. - Docs site: pin npm dependencies to exact versions and harden installs against supply-chain
attacks (
website/.npmrc,website/bunfig.toml: no lifecycle scripts, 7-day minimum release age, frozen lockfile, Dependabot cooldown). - Rename the package from
flutter_mobile_webviewtoadvanced_webview(Dart package, entry librarypackage:advanced_webview/advanced_webview.dart, Android package/namespace, iOS module and Pigeon channel names) and the public classes fromMobileWebView/MobileWebViewControllertoAdvancedWebView/AdvancedWebViewController. - iOS: raise the minimum iOS version to 18.0.
- iOS: run
evaluateJavaScripton the main thread; it could hang when called off it. - Make
README.mdEnglish and move the Japanese README toREADME.ja.md. - Add MIT license, community health files, issue/PR templates and pub.dev metadata.
- Pin Flutter 3.47.8 with mise (
mise.toml); CI uses the same version. - Android: detach the WebView from its previous container when a controller is shown
by a new
AdvancedWebView, so re-attaching a controller does not fail. - iOS: app-initiated loads (
loadUrl,loadHtmlString,reload,goBack,goForward) no longer reachonNavigationRequest, matching Android. - Add native unit tests (Robolectric on Android, XCTest on iOS) and run the integration tests on an Android emulator and an iOS simulator in CI.
- Lint and format native code in CI: ktlint for Kotlin and swift-format for Swift (Pigeon-generated files are excluded).
- iOS: support both Swift Package Manager and CocoaPods, and ship a privacy manifest
(
PrivacyInfo.xcprivacy) with either. CI builds the example app with each. - Add AI agent configuration (
AGENTS.md, APM with shared skills fromimk1t/apm-shared).
0.0.1 #
- Initial scaffold: Pigeon-based platform contract, Android (Kotlin) and iOS (Swift) implementations, and an example app.