Hello, I'm trying to build a kmm library for andro...
# multiplatform
m
Hello, I'm trying to build a kmm library for android and iOs that includes a webview. Does this work for iOS or macOS/other native only?:
Copy code
import kotlinx.cinterop.*
import platform.WebKit.*
import platform.Foundation.NSZeroRect

class myWebView : WKWebView(frame = NSZeroRect.readValue(), configuration = WKWebViewConfiguration())
For anyone searching in the future, I was able to get this to work on iOS from kotlin with:
Copy code
class ZoneView(): WKWebView (frame = cValue { CGRectZero }, configuration = WKWebViewConfiguration()), UIViewWithOverridesProtocol
Adding the UIViewWithOverridesProtocol with a .def file similar to this SO .