OMG, I just saw that the new #SwiftUI WebView is available already on iOS 18.4 with Xcode 26 on macOS Sequoia. 👀 Gonna try this… Finally a "swifty" way to use #WKWebView in SwiftUI.
OMG, I just saw that the new #SwiftUI WebView is available already on iOS 18.4 with Xcode 26 on macOS Sequoia. 👀 Gonna try this… Finally a "swifty" way to use #WKWebView in SwiftUI.
Kinda disappointed there aren't really any WKWebView API improvements this year. There are lots of open tickets requesting things (like notifying on safe area inset changes) to be made part of the public API, and those sit open for years with no response.
I can't open PRs on WebKit to fix those because they have to go through Apple's internal API review, but nobody is stepping up to make that happen 😞
The MarkupEditor handles keydown specially in markup.js for some specific cases: Enter when inside of a list or blockquote/indent and at the beginning or end of a styled paragraph Backspace/Delete ...
If you build with an older #Swift SDK (i.e., on Ventura), the #WKWebView isInspectable property doesn't exist. You can block out code at compile time by checking on the compiler version. This also solved some GitHub actions build issues for me.
#if compiler(>=5.8)
if #available(iOS 16.4, *) {
webView.isInspectable = MarkupEditor.isInspectable
}
#endif
Thanks to @mattiem for pointing to this blog post - https://www.chimehq.com/blog/swift-and-old-sdks - which was very helpful.
To all #iOS #dev who follow me :
I’m trying to snapshot a #WKWebView (used to display a YT player with #YoutubePlayerKit by @SvenTiigi).
It works well on simulator but it never works on real device (where I always get black image)!
I wonder if one of you have ever tried something equivalent, if you had problem too and if you have a solution ?