Jetpack datastore is compatible with compose for d...
# compose-desktop
u
Jetpack datastore is compatible with compose for desktop ?
m
Yes
u
Thanks 🙂
c
i can probably look for myself. but does anyone know how datastore stores data on desktop? on android datastore is in a "private" app directory so you can't access it unless you have root. i guess you can't do the same on desktop... but is it just a xml key value file? mostly just curious at this point.
p
did you make it work?
If I generate the executable and execute it under Windows... it doesn't work. Doesn't store or recover variables. I see that a
app.preferences_pb.tmp
file is created on the application AppData folder, where it haves permissions and reading or writting of other non datastore files works... but in this case this file has 0 bytes size. Note it's a
.tmp
file, and when I execute it under
Android Studio
i receive a full working file without
.tmp
extension. What is happening?
c
did not end up trying it out... yet
p
I make it work
Copy code
nativeDistributions {
        modules("jdk.unsupported")
        modules("jdk.unsupported.desktop")
👍 2
those two lines solves the issue