what in the world is this `__attribute__((unavaila...
# kotlin-native
k
what in the world is this
__attribute__((unavailable("Kotlin subclass of Objective-C class can't be imported")))
s
Exporting a class that inherits from Obj-C isn't supported yet. https://github.com/JetBrains/kotlin-native/blob/master/OBJC_INTEROP.md#unsupported
k
that seems like a big gap
s
It does present some strong limitations on what K/N can be used for. Right now it is shines most strongly as a way to share logic between platforms and not so much as something to completely replace Swift.
k
yeah, fortunately there's a fairly simple workaround for what I am doing (very small API)
you can create top-level functions to create and call methods on the Obj-C subclass (i.e., ViewController)