Skip to content

Detecting the host system ? #74

Closed
Closed

Description

  1. Is there a way to detect which OS or platform is running my app ?
  2. Does Uno support compiler directives like: #if ANDROID or similar approach.

Activity

  1. jeromelaban commented on Jun 28, 2018

    @jeromelaban
    Member

    Most of the time, the conditional compilation directives are enough, and those are the ones provided by Xamarin, by default: __ANDROID__, __IOS__. For Wasm, it's defined manually as __WASM__ until nuget supports it properly.

    Also, part of the information can be found here in RuntimeInformation

  2. added
    question
    on Jul 1, 2018
  3. queequac commented on Jul 6, 2018

    @queequac

    Just answers the second issue for compiler directives... regarding the first question, it would be quite cool if you could add support for Windows.System.Profile.AnalyticsInfo, providing information about the OS and it's version.
    DeviceFamily for example holds "Windows.Mobile", "Windows.Xbox" and so on. Why not add adding "Android" or even "Android.Mobile" there?

  4. added
    kind/enhancement
    on Nov 28, 2018
  5. self-assigned this
    on Jun 20, 2019
  6. added
    platform/android 🤖
    platform/ios 🍎
    and removed
    question
    on Jun 20, 2019
  7. removed their assignment
    on Aug 23, 2019
  8. davidjohnoliver commented on Oct 6, 2020

    @davidjohnoliver
    Contributor

    This has been implemented! (#1970 and #2574)

  9. added a commit that references this issue on Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementplatform/android 🤖platform/ios 🍎

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions