Add an API to get the current Uno Platform target at runtime
What would you like to be added:
Currently it is possible to conditionally compile code to run on specific platforms, but there is no easy way to check the current Uno target at runtime. This would be especially useful to differentiate between Skia targets.
This could be a simple static method that would return an enum with Windows, iOS, SkiaWpf, SkiaGtk, etc.
Why is this needed:
Runtime checks
For which Platform:
All
@MartinZikmund i hope you dont mind me highjacking your issue.
i am at the moment working out on where i could set the current value. Any guidance here is apprechiated.
i plan this week to create a first draft PR for the extension of the PlatformHelper class and creation of the new enum.
@MartinZikmund readed a Month ago or less something about this topic as has been enhanced / tackled, maybe we got this resolved? but I see this PR sees to be pending, unmerged 🤔 maybe somebody can check whats up with this or may causes trouble
It's not fixed yet, there's work left to do on the technical side.
Note: That API need to provide not only the runtime but also the target on which it runs. This would allow us to properly implement scrolling deceleration for iOS devices on skia-WASM for instance.