I've been working in my KMP Project (Android-Desktop), but it seems KMP has no supports for Desktop (yet?).
The problem I faced is on this code on androidMain in sample github repo:
fun getDataStore(context: Context): DataStore<Preferences> = getDataStore(
producePath = { context.filesDir.resolve(dataStoreFileName).absolutePath }
)
How can I replace the the directory or path for Desktop?
And if possible, I want to know other DataStore / SharedPreference-like libraries and their use example for KMP
Nevermind, I have found how to do DataStore/SharedPref thing in KMP.
Currently, I'm using Multiplatform Settings
Here's the example:
Shared:
Android:
Desktop (Use JVM):
If you wanna go for specific platform for ObservableSettings see this link