Post

Replies

Boosts

Views

Activity

Reply to Compatibility Issue with WebKit.WKWebView.evaluateJavaScript(_:completionHandler:) in Xcode 16
There are a few complications with switching to Xcode 16 at the moment, so we’ll need to find another solution. We’ve introduced a flag like #if compiler(>=6) to handle both the new and old method signatures. Does this approach work for everyone? #if compiler(>=6) { public override func evaluateJavaScript(_ javaScriptString: String, completionHandler: (@MainActor @Sendable (Any?, (any Error)?) -> Void)? = nil) { super.evaluateJavaScript(javaScriptString, completionHandler: completionHandler) } #else public override func evaluateJavaScript(_ javaScriptString: String, completionHandler: ((Any?, Error?) -> Void)? = nil) { super.evaluateJavaScript(javaScriptString, completionHandler: completionHandler) } #endif
Oct ’24