evaluateURL(_:completionHandler:)
Determines whether to block a URL.
Declaration
func evaluateURL(_ url: URL, completionHandler: @escaping @Sendable (Bool, Data?) -> Void)func evaluateURL(_ url: URL) async -> (Bool, Data?)Parameters
- url:
The URL to evaluate.
- completionHandler:
A closure that the system invokes when URL evaluation finishes. The closure returns
trueif the URL is blocked;false, otherwise.
Discussion
If this method blocks a URL, it returns a UTF-8 encoded HTML representation of a blocking page.
This method performs a lazy initialization of some objects, so the first call can take longer than subsequent calls.