Hi, I'm looking for an example macOS project made ...
# kotlin-native
l
Hi, I'm looking for an example macOS project made with Kotlin/Native, where can I find one?
g
K/N repo has some macos examples
o
New project wizard can generate such sample
l
@olonho It currently only allows command line apps and frameworks. Are there any plans to add more type of apps, like Cocoa apps, ScrenSavers (that's precisely what I want to do with Kotlin), an others?
g
For which part of Cocoa do you need example? There is example of AppKit application for Mac https://github.com/JetBrains/kotlin-native/blob/master/samples/objc/src/objcMain/kotlin/Window.kt
But looks that ScrenSaver.framework is not available in default platform APIs
It would be interesting to have example how add system framework to cinterop, I tried to use similar declaration as K/N does for other system frameworks, but it generates empty file, only package
Just replace name of framework and add it to cinterop in build.gradle
Okay, it works, I replaced
modules
with
headers = ScreenSaver/ScreenSaver.h