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

Enhance PlatformHelper class with a Platform enum property #1761

Closed
2 tasks
BernhardPollerspoeck opened this issue Aug 12, 2023 · 2 comments
Closed
2 tasks
Labels
kind/enhancement New feature or request. triage/duplicate Indicates an issue is a duplicate of other open issue. triage/untriaged Indicates an issue requires triaging or verification.

Comments

@BernhardPollerspoeck
Copy link

What would you like to be added:

I want to add a Enum to PlatformHelper that indicates the current platform:

public enum EPlatform
{
Undefined,

Wpf,
Wasm,
Linux,
Ios,
Android,

}

In my own Implementation i at the moment set the 1 time setable property in the Program.cs(or compareable). This may should be moved to another location that is not dependant on the template.(There i might need some guidance)

Why is this needed:

To be able to clearly identify the current platform

For which Platform:

  • [ x] iOS
  • [ x] Android
  • [ x] WebAssembly
  • WebAssembly renders for Xamarin.Forms
  • [ x] Windows
  • Build tasks

Anything else we need to know?

I would do the implementation and prepase a PR.

@BernhardPollerspoeck BernhardPollerspoeck added kind/enhancement New feature or request. triage/untriaged Indicates an issue requires triaging or verification. labels Aug 12, 2023
@Youssef1313
Copy link
Member

This is a duplicate of unoplatform/uno#11545.

I'll close as a duplicate, but I'm curious though about your exact use case.

@Youssef1313 Youssef1313 added the triage/duplicate Indicates an issue is a duplicate of other open issue. label Aug 14, 2023
@BernhardPollerspoeck
Copy link
Author

@Youssef1313 for me its as first usecase deciding navigation and displaying different pages based on platform.

i am going ahead and look into the linked issue and work out my questions there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request. triage/duplicate Indicates an issue is a duplicate of other open issue. triage/untriaged Indicates an issue requires triaging or verification.
Projects
None yet
Development

No branches or pull requests

2 participants