getosinfo 1.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package getosinfo --version 1.3.0                
NuGet\Install-Package getosinfo -Version 1.3.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="getosinfo" Version="1.3.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add getosinfo --version 1.3.0                
#r "nuget: getosinfo, 1.3.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install getosinfo as a Cake Addin
#addin nuget:?package=getosinfo&version=1.3.0

// Install getosinfo as a Cake Tool
#tool nuget:?package=getosinfo&version=1.3.0                

getosinfo

getosinfo is a simple libary that you can use to get a device's os informaion (platform, manufacturer, name .etc)

DOCS

getting basic info

Add a reference to GetOsinfo in your class: using GetOsinfo;

// Device Model (SMG-950U, iPhone12)
var device = Osinfo.Model;

// Manufacturer (Samsung)
var manufacturer = Osinfo.Manufacturer;

// Device Name (Jon's iPhone)
var deviceName = Osinfo.Name;

// Operating System Version Number (12.0)
var version = Osinfo.Version;

// Platform (Android)
var platform = Osinfo.Platform;

// Idiom (Phone)
var idiom = Osinfo.Idiom;

// Device Type (Physical)
var deviceType = Osinfo.DeviceType;

getting os type (Desktop or Mobile)

simply use Osinfo.GetOSPlatformType(OsTypes.Desktop) <br> you can also check for specific platforms with these:

OsTypes.Android;
OsTypes.iOS;
OsTypes.Windows;
OsTypes.Linux;
OsTypes.MacOS;
OsTypes.Mobile;
OsTypes.Desktop;

Idiom

OsIdiom.Idiom correlates a constant string that maps to the type of device the application is running on. The values can be checked with the OsIdiom struct:

    OsIdiom.Phone � Phone
    OsIdiom.Tablet � Tablet
    OsIdiom.Desktop � Desktop
    OsIdiom.TV � TV
    OsIdiom.Watch � Watch
    OsIdiom.Unknown � Unknown

Device Type

Osinfo.DeviceType correlates an enumeration to determine if the application is running on a physical or virtual device. A virtual device is a simulator or emulator.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.1 230 6/9/2023 1.4.1 is deprecated because it is no longer maintained.
1.4.0 157 6/9/2023
1.3.0 348 12/8/2022
1.2.0 358 12/6/2022
1.1.0 347 12/6/2022