Hello :smile: Is there a way to know at runtime in...
# multiplatform
t
Hello 😄 Is there a way to know at runtime in KMP if my app is running on a Simulator (for iOS for my case)? I didn’t found a trick with
platform.UIKit.UIDevice
Thanks
s
You could try adding this block somewhere in your Swift entry points:
Copy code
#if targetEnvironment(simulator)
 // Your state handling for simulator
#endif
👍 1
t
Yes this is what i did, from my native Swift part Its working but i wanted to know if it can be handle by only kmp
s
Not that I'm aware of. You will likely just have to set a variable to
true
or make some config object, and then pass that into the
UIViewController
of
ComposeView
👍 1