Is there a way to obtain platformName in code with...
# multiplatform
b
Is there a way to obtain platformName in code without manually declaring
expect val platform:String
?
m
maybe from gradle you could get it from target name, and then with https://github.com/yshrsmz/BuildKonfig add it code
b
I'm looking for runtime-only way
d
Yes there's a
Platform
class.
It only works on native though.
a
You can use expect/actual constant for that