feat: Add iOS Screen Time detection to WebKitWebViewController#5
Open
mimosa-ai-bot[bot] wants to merge 4 commits intomainfrom
Open
feat: Add iOS Screen Time detection to WebKitWebViewController#5mimosa-ai-bot[bot] wants to merge 4 commits intomainfrom
mimosa-ai-bot[bot] wants to merge 4 commits intomainfrom
Conversation
Add getIsBlockedByScreenTime() method to UIViewWKWebView Pigeon interface and regenerate platform code. This exposes the iOS 26.0+ WKWebView property for detecting Screen Time blocking. Related to PRO-2378 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add getIsBlockedByScreenTime implementation in WebViewProxyAPIDelegate.swift with iOS 26.0+ availability check using #available. Throws PlatformException on older iOS versions. Related to PRO-2378 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Expose Screen Time blocking detection as a public getter on WebKitWebViewController. Returns false on iOS < 26.0 instead of throwing, providing graceful degradation for older iOS versions. Related to PRO-2378 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add CHANGELOG entry documenting the new isBlockedByScreenTime getter for iOS 26.0+ Screen Time blocking detection. Related to 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
Implements iOS Screen Time detection for Flutter webviews by exposing the
isBlockedByScreenTimeproperty from WKWebView (iOS 26.0+).This allows applications to detect when a webview is blocked by Screen Time restrictions and provide user-friendly messaging instead of showing an infinite loader.
Linear Ticket: PRO-2378
Changes Made
Files Modified (7 total)
Pigeon API Definition:
packages/webview_flutter/webview_flutter_wkwebview/pigeons/web_kit.dart- AddedgetIsBlockedByScreenTime()method to UIViewWKWebView classAuto-generated Platform Code:
packages/webview_flutter/webview_flutter_wkwebview/lib/src/common/web_kit.g.dart- Generated Dart bindingspackages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/WebKitLibrary.g.swift- Generated Swift bindingsNative Implementation:
packages/webview_flutter/webview_flutter_wkwebview/darwin/webview_flutter_wkwebview/Sources/webview_flutter_wkwebview/WebViewProxyAPIDelegate.swift- Implemented native method with iOS 26.0+ availability checkDart API:
packages/webview_flutter/webview_flutter_wkwebview/lib/src/webkit_webview_controller.dart- Added publicisBlockedByScreenTimegetter with error handlingDocumentation:
packages/webview_flutter/webview_flutter_wkwebview/CHANGELOG.md- Added changelog entryImplementation Details
iOS Version Handling
isBlockedByScreenTimevalue from WKWebViewfalsegracefully (no crash or error to user)#available(iOS 26.0, *)for runtime version checkingUsage Example
Acceptance Criteria Status
WebKitWebViewControllervia public getterWebKitWebViewController, not base class)Testing
Recommended Manual Testing
truewhen webview is blockedfalsefalsewithout crashingIntegration
flutter_packagesrepositoryNext Steps: This PR is ready for code review. Once approved and merged, the Linear ticket can be closed.
🤖 Generated with Claude Code