Hi!
I am new to Desktop Compose and was just trying a small Hello World! I just created a small app set up via File > New Project > Desktop Compose (which I assume comes from the Android plugin). However, when I run the app under macOS, then it fails with an error:
WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
I have 2 questions: 1) What is the development level of Desktop Compose (for MacOS), is it still alpha?
2) How do I fix the above problem: Gemini suggests to implement
MyApplication
that implements the
NSApplicationDelegate
but when I copy this code into the src/main/kotlin/Main.kt, the
NSApplication
and
NSApplicationDelegate
are unknown and there is no suggestion from where to import them.
The generated project uses "org.jetbrains.compose.ui
desktop ui1.6.10". (Please let me know if I should post the generated code. I am using IntelliJ Ultimate 2024.1.2 on arm64 MacOS.)
Thanks for suggestions
Melchior