https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
m

mbonnin

10/20/2023, 2:12 PM
Is there an
appleMain
API that can detect whether the code is running on MacOS vs iOS vs watchOS, etc... ?
j

jw

10/20/2023, 2:18 PM
You could have an enum and an expect val platform thats actualized in each platform's source set
👍 1
m

mbonnin

10/20/2023, 2:19 PM
Was too lazy for that blob upside down but I guess this is the way...
o

Oleg Yukhnevich

10/20/2023, 3:04 PM
m

mbonnin

10/20/2023, 3:05 PM
Perfect 👌
l

Landry Norris

10/20/2023, 3:05 PM
Was just about to suggest that, but note that it's getting moved for 2.0
m

mbonnin

10/20/2023, 3:06 PM
This is for tests so it's fine, I'll change my tests for 2.0 👍
And this saves me 4 files with 1 line in each 🙏
e

Edoardo Luppi

10/22/2023, 9:07 PM
> but note that it's getting moved for 2.0 Removed (or just moved out of native)? Do you know why?
👀 1
e

Edoardo Luppi

10/22/2023, 10:13 PM
Part of the native cleanup basically