banditoth.MAUI.DeviceId 1.0.0

dotnet add package banditoth.MAUI.DeviceId --version 1.0.0                
NuGet\Install-Package banditoth.MAUI.DeviceId -Version 1.0.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="banditoth.MAUI.DeviceId" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add banditoth.MAUI.DeviceId --version 1.0.0                
#r "nuget: banditoth.MAUI.DeviceId, 1.0.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 banditoth.MAUI.DeviceId as a Cake Addin
#addin nuget:?package=banditoth.MAUI.DeviceId&version=1.0.0

// Install banditoth.MAUI.DeviceId as a Cake Tool
#tool nuget:?package=banditoth.MAUI.DeviceId&version=1.0.0                

banditoth's MAUI.Packages 🏝

A toolkit for .NET MAUI, containing useful stuff to ease development for MAUI applications.

Packages

Package name NuGet status Android iOS Windows MacCatalyst Tizen
banditoth.MAUI.Multilanguage nuGet version
banditoth.MAUI.DeviceId nuGet version
banditoth.MAUI.JailbreakDetector nuGet version
banditoth.MAUI.MVVM nuGet version

banditoth.MAUI.DeviceId

Initalization

Initalize the plugin within your MauiProgram.cs's CreateMauiApp method. Use the .ConfigureDeviceIdProvider extension method with the using banditoth.MAUI.DeviceId;

    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .ConfigureFonts(fonts =>
            {
                fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
                fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
            })
            .ConfigureDeviceIdProvider();
#if DEBUG
        builder.Logging.AddDebug();
#endif

        return builder.Build();
    }

Usage

Use the code with by resolving an instance of IDeviceIdProvider.

The GetDeviceId method returns an unique device identifier. On Android it serves the data from AndroidId, on iOS and MacCatalyst it uses the IdentifierForVendor. Windows returns the GetSystemIdForPublisher().Id as a string.

The GetInstallationId method generates an unique identifier for the application, which will be stored until the application is being reinstalled, or the application's data being erased.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-android33.0 is compatible.  net7.0-ios was computed.  net7.0-ios16.1 is compatible.  net7.0-maccatalyst was computed.  net7.0-maccatalyst16.1 is compatible.  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.
  • net7.0

    • No dependencies.
  • net7.0-android33.0

    • No dependencies.
  • net7.0-ios16.1

    • No dependencies.
  • net7.0-maccatalyst16.1

    • No dependencies.

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.0.0 13,996 1/13/2023
0.0.2-pre 143 1/13/2023
0.0.1-pre 140 1/13/2023