From within my Kotlin-Native shared code I need to get the build variant of the app running it - for both Android and iOS.
Is it possible and how can I get it?
Assuming in commonMain I'll have expect val buildVar: String,
then how would I get the respective build variants within the androidMain and iosMain main directories? actual val buildVar = ...???
import platform.UIKit.UIDevice actual fun platformName(): String { return UIDevice.currentDevice.systemVersion }to get the iOS device's system version.import platform.Foundation.NSBundleand go with a solution above. About android - in the question it is unclear are you targetingandroid()orandroidNativeArm32/64. For justandroid(), the first link seems totally applicable.