feat: Add iOS Screen Time detection to webview_flutter_wkwebview#6
Open
mimosa-ai-bot[bot] wants to merge 1 commit intomainfrom
Open
feat: Add iOS Screen Time detection to webview_flutter_wkwebview#6mimosa-ai-bot[bot] wants to merge 1 commit intomainfrom
mimosa-ai-bot[bot] wants to merge 1 commit intomainfrom
Conversation
Add support for detecting when a Flutter webview is blocked by iOS Screen Time restrictions. This exposes the iOS 26.0+ WKWebView.isBlockedByScreenTime property through a new getter on WebKitWebViewController. Implementation includes: - Pigeon API definition for getIsBlockedByScreenTime() method - Swift native implementation with iOS 26.0+ availability check - Dart public getter on WebKitWebViewController with error handling - Documentation updates in CHANGELOG.md and README.md The property returns false on iOS versions prior to 26.0, providing graceful fallback behavior. Closes: PRO-2378 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for detecting when a Flutter webview is blocked by iOS Screen Time restrictions, implementing the feature requested in Linear ticket PRO-2378.
Changes Made
getIsBlockedByScreenTime()method toUIViewWKWebViewclass inpigeons/web_kit.dartWebViewProxyAPIDelegate.swiftwith iOS 26.0+ availability checkisBlockedByScreenTimegetter toWebKitWebViewControllerclass with proper error handlingImplementation Details
The implementation exposes the iOS 26.0+
WKWebView.isBlockedByScreenTimeproperty through a new getter onWebKitWebViewController. The property returnsfalseon iOS versions prior to 26.0, providing graceful fallback behavior.Usage Example
Acceptance Criteria
Files Modified
pigeons/web_kit.dart- Pigeon API definitionlib/src/common/web_kit.g.dart- Auto-generated Dart codedarwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/WebKitLibrary.g.swift- Auto-generated Swift codedarwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/WebViewProxyAPIDelegate.swift- Swift implementationlib/src/webkit_webview_controller.dart- Dart public APICHANGELOG.md- Feature documentationREADME.md- Usage exampleTesting
This feature can be manually tested on iOS 26+ devices/simulators with Screen Time restrictions configured. For older iOS versions, the property should return
falsewithout errors.🤖 Generated with Claude Code