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
Completion Handler in For/In Loop - Swift
How to Check for Self with Contains() in Swift
Adding Data to a Specific UId in Firebase
Access Safari Bookmarks in Macos Mojave Programmatically
Swift Nstimer Dynamically Changing Interval
How to Get Alphabetic Tableview Sections from an Object
How to Bend a Rectangle in Sprite Kit
Swift & Nstextfield: How to Work with Text Completion
Swiftui Index Out of Range in Foreach
Is There an Object Class in Swift
How to Drag a Working Slider Using Swiftui
How to Get Section of UItableview from Inside a Child UIcollectionview
Mkpolyline Broken When Using Type Satelliteflyover
How to Make an Ellipse/Circular UIimage with Transparent Background
How to Put a View with Loadmore Button in UItableview After The Cell