Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an API to get the current Uno Platform target at runtime #11545

Open
MartinZikmund opened this issue Mar 2, 2023 · 1 comment · May be fixed by #18758
Open

Add an API to get the current Uno Platform target at runtime #11545

MartinZikmund opened this issue Mar 2, 2023 · 1 comment · May be fixed by #18758
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/enhancement New feature or request low-hanging-🍒 Categorizes an issue that might be a quick win with meaningful positive impact.

Comments

@MartinZikmund
Copy link
Member

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 MartinZikmund added kind/enhancement New feature or request good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers labels Mar 2, 2023
@BernhardPollerspoeck
Copy link

@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 MartinZikmund added the low-hanging-🍒 Categorizes an issue that might be a quick win with meaningful positive impact. label Aug 23, 2023
@mcNets mcNets linked a pull request Nov 9, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/enhancement New feature or request low-hanging-🍒 Categorizes an issue that might be a quick win with meaningful positive impact.
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants