Kebechet.Maui.MicrosoftClarity
1.0.1
Prefix Reserved
See the version list below for details.
dotnet add package Kebechet.Maui.MicrosoftClarity --version 1.0.1
NuGet\Install-Package Kebechet.Maui.MicrosoftClarity -Version 1.0.1
<PackageReference Include="Kebechet.Maui.MicrosoftClarity" Version="1.0.1" />
paket add Kebechet.Maui.MicrosoftClarity --version 1.0.1
#r "nuget: Kebechet.Maui.MicrosoftClarity, 1.0.1"
// Install Kebechet.Maui.MicrosoftClarity as a Cake Addin #addin nuget:?package=Kebechet.Maui.MicrosoftClarity&version=1.0.1 // Install Kebechet.Maui.MicrosoftClarity as a Cake Tool #tool nuget:?package=Kebechet.Maui.MicrosoftClarity&version=1.0.1
Maui.MicrosoftClarity
Usage
Firstly register package installer in your MauiProgram.cs
builder.Services.AddMicrosoftClarity();
then in App.xaml.cs
inject MicrosoftClarityService
:
public partial class App : Application {
private readonly MicrosoftClarityService _microsoftClarityService;
public App(MicrosoftClarityService microsoftClarityService) {
InitializeComponent();
_microsoftClarityService = microsoftClarityService;
}
}
and also override there method OnStart()
to call _microsoftClarityService.Initialize
with your project id.
protected override void OnStart() {
_microsoftClarityService.Initialize("<MicrosoftClarityProjectIdHere>");
base.OnStart();
}
⚠️ iOS Local debugging
Because of MAUI and VS bugs:
- https://github.com/xamarin/xamarin-macios/issues/19229
- https://developercommunity.visualstudio.com/t/MAUI---Cannot-create-native-types-when-d/10180586
this won't work in iOS simulator(simulator from MAC), local device(iPhone connected to Windows) neither in remote device(iPhone connected to MAC)
Dummy classes
So that you dont have to specify platform for this package and it's calls, also Windows and MacCatalyst are added with dummy implementations. When you call one of their methods you will always get:
true
for bool returnsnew List<>
for collectionsstring.Empty
for string values
Exception behavior
- Library will throw exceptions only in case developer did some mistake
- in other cases, when there is some corrupted state it will return default value of that type.
Contributions
Feel free to create an issue or pull request. In case you would like to do massive changes in the package please firstly discuss them in the issue because otherwise there is high chance that such big PR would be rejected.
License
This repository is licensed with the MIT license.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-android34.0 is compatible. net8.0-ios17.2 is compatible. net8.0-maccatalyst17.2 is compatible. net8.0-windows10.0.19041 is compatible. |
-
net8.0-android34.0
- Kebechet.Maui.MicrosoftClarity.Android (>= 2.4.0.2)
- Microsoft.Maui.Controls (>= 8.0.61)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.61)
-
net8.0-ios17.2
- Kebechet.Maui.MicrosoftClarity.iOS (>= 1.0.1.1)
- Microsoft.Maui.Controls (>= 8.0.61)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.61)
-
net8.0-maccatalyst17.2
- Microsoft.Maui.Controls (>= 8.0.61)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.61)
-
net8.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 8.0.61)
- Microsoft.Maui.Controls.Compatibility (>= 8.0.61)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fixed return type of Set methods