Wkwebview Problems in Macos Mojave

WKWebView web inspector in macOS app fails to render and flickers/flashes

The issue appears to be with using constraints on a WKWebView. If you have an autolayout view and a WKWebView, turning off constraints fixes the inspector rendering. In my app, the UI is just a big browser window, so I could turn off autolayout for the view, add springs and struts, and everything renders properly.

I hate answering my own question, but...

Loading a URL with a WKWebView in macOS

The problem was that I had not enabled Incoming and Outgoing Connections in my app's sandboxing settings. I discovered this by reverting to using the legacy WebView and then getting an error code in the console. WKWebKit will not print error messages making something really simple incredibly difficult and confusing!. Apple really needs to fix that

macOS WKWebView background transparency

This should work for both macOS 10.11 and macOS 10.12:

if NSAppKitVersion.current.rawValue > 1500 {
webView.setValue(false, forKey: "drawsBackground")
}
else {
webView.setValue(true, forKey: "drawsTransparentBackground")
}

Remark: this has been passed by App Store review.

Archived macOS app launches with blank window

This problem is caused by WKWebView.
So, you need remove WKWebView from IB and then create it with code and add it to the view.

REFER:

https://forums.developer.apple.com/thread/116047

http://www.openradar.me/23699297

Safari web inspector not working with cordova in iOS12 and mac OS Mojave

download & try same in Safari Technology Preview https://developer.apple.com/safari/technology-preview/



Related Topics



Leave a reply



Submit