WKWebView isBlockedByScreenTime

WKWebView has a new property "isBlockedByScreenTime" since iOS 26. But I do not yet understand when exactly this property could be used.

When I setup content-based restrictions in the ScreenTime settings then WKWebView reports an error 105 via "webView:didFailProvisionalNavigation:" delegate. The isBlockedByScreenTime property still returns false in this case.

If ScreenTime has a time-based limit, the App would not run at all.

Under which circumstances would the property "isBlockedByScreenTime" return the value true? When exactly and for what can this property be actually used?

The "problem" is that I want to find if a web page is blocked and can not be loaded, why this is the case. By simply trial and error I found out that WKWebView returns error codes 104 and 105 for blocked web sites because of content filters and Screen Time restrictions, however these error codes are not documented at all (at least I've not found any documentation or documentation for these error codes and also some other codes like 100, 102, 204 etc), so I'm not really sure if I handle all cases correctly. I hoped that isBlockedByScreenTime would at least tell me one reason for blocked pages.

If there are documents which explain these error codes (100 and above), where I can find these?

Answered by DTS Engineer in 869769022

I recommend filing an enhancement request asking for documentation for these items. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

I recommend filing an enhancement request asking for documentation for these items. If you post the Feedback number here I'll check the status next time I do a sweep of forums posts where I've suggested bug reports.

Bug Reporting: How and Why? has tips on creating your bug report.

isBlockedByScreenTime is a property that reports whether the web page is currently blocked, set via the App Limits in Screen Time. There is an option to create an app limit for websites there. This is different from content-based restrictions set via the Content & Privacy in Screen Time. If you set a limit for apple.com via the App Limits, you would see isBlockedByScreenTime return true when navigated to apple.com and the time limit is up. This property can be used if you want to detect when the WKWebView is currently being blocked by App Limits and do something based on that information. Note that the error codes you see are unrelated to the Screen Time App Limits and the isBlockedByScreenTime property. The current definition for the error values can be found in the WebKit Open Source project, but they are an internal implementation detail and the behavior is subject to change in future OS releases.

WKWebView isBlockedByScreenTime
 
 
Q