Does WKWebview support encrypted DNS when using Network.framework PrivacyContext Api?

After App uses Network.framework PrivacyContext Api, dns has been encrypted, that is good. But when using wkwebview to load web page, wireshark captures normal dns request sent by wkwebview. Does wkwebview use DoH to resolve domain? if can, how to config params? If can not, is there anyway to stop wkwebview sending normal dns, such as local proxy.

Answered by DTS Engineer in 872555022
WKWebView operates independently with its own networking stack.

While it’s true that WKWebView does its networking out of process, it tries to hide that as much as possible by ascribing the networking to your app. For example, any cellular data consumed by WKWebView is ‘billed’ to your app.

So, it’s not unreasonable to expect it to honour the Network framework default privacy context.


双木木, if you’re not seeing WKWebView honour the default privacy context and you’d like to see that change, I encourage you to file a bug about it.

And if you do file a bug, please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I don't think so. It only applies to network connections you make directly through that framework - WKWebView operates independently with its own networking stack.

Accepted Answer
WKWebView operates independently with its own networking stack.

While it’s true that WKWebView does its networking out of process, it tries to hide that as much as possible by ascribing the networking to your app. For example, any cellular data consumed by WKWebView is ‘billed’ to your app.

So, it’s not unreasonable to expect it to honour the Network framework default privacy context.


双木木, if you’re not seeing WKWebView honour the default privacy context and you’d like to see that change, I encourage you to file a bug about it.

And if you do file a bug, please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Does WKWebview support encrypted DNS when using Network.framework PrivacyContext Api?
 
 
Q