Is it possible to use WKWebView on macOSX target f...
# kotlin-native
j
Is it possible to use WKWebView on macOSX target for kotlin native? I do not seem to find any imports for it? (https://developer.apple.com/documentation/webkit/wkwebview)
j
you may import any Framework to your project with the
cinterop
tool (included in Kotlin/Native)
j
Yeah Im just confused, because https://github.com/JetBrains/kotlin-native/blob/master/PLATFORM_LIBS.md basicly sais everything should be there except WebAssembly
j
that part was only about POSIX
l
@jonnyzzz Is there any example on how to import a framework that Kotlin/Native doesn't by default? (I'm looking forward using CoreBluetooth on macOS)
a
@JoakimForslund WKWebView can be imported as
import platform.WebKit.WKWebView
, as it is a class from WebKit framework
@louiscad CoreBluetooth must be available in master, provided by PR#3141
👍 1
j
@Artyom Degtyarev [JB] Yeah thats the issue, WebKit is not found on macosX native
So I guess what @jonnyzzz is that this does not exist by default in macOS target and needs to be added manually
a
Oh, my fault. It is also available only in the
master
branch for now. You can try it, or wait for the future release. Or, of course, import it by yourself
j
it is definitely there
Hmm, is there an alpha for
multiplatform
that includes it?
Seems pretty easy to add tho, as you suggest
j
Ended up with just copying the contents of the WebKit.def from master into my own def configuration
Works for now 🙂
👍 2
l
Thanks for the tip @Artyom Degtyarev [JB], I see a lot macOS frameworks are coming in this PR (link for reference: https://github.com/JetBrains/kotlin-native/pull/3141), including ScreenSaver (though I don't know how to package that one for now)!