Kebechet.Maui.MicrosoftClarity
4.0.0
Prefix Reserved
dotnet add package Kebechet.Maui.MicrosoftClarity --version 4.0.0
NuGet\Install-Package Kebechet.Maui.MicrosoftClarity -Version 4.0.0
<PackageReference Include="Kebechet.Maui.MicrosoftClarity" Version="4.0.0" />
<PackageVersion Include="Kebechet.Maui.MicrosoftClarity" Version="4.0.0" />
<PackageReference Include="Kebechet.Maui.MicrosoftClarity" />
paket add Kebechet.Maui.MicrosoftClarity --version 4.0.0
#r "nuget: Kebechet.Maui.MicrosoftClarity, 4.0.0"
#:package Kebechet.Maui.MicrosoftClarity@4.0.0
#addin nuget:?package=Kebechet.Maui.MicrosoftClarity&version=4.0.0
#tool nuget:?package=Kebechet.Maui.MicrosoftClarity&version=4.0.0
Maui.MicrosoftClarity
Wrapper for Microsoft Clarity for mobile
Usage
Firstly register package installer in your MauiProgram.cs
builder.Services.AddMicrosoftClarity();
then in App.xaml.cs inject IMicrosoftClarityService:
public partial class App : Application {
private readonly IMicrosoftClarityService _microsoftClarityService;
public App(IMicrosoftClarityService 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
- potential workaround: https://github.com/dotnet/maui/issues/10800#issuecomment-1301564278
it is not possible to run your app with hot-restart(direct local iOS deploy from VS for Windows)
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:
truefor bool returnsnew List<>for collectionsstring.Emptyfor 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.
Automated SDK updates
This repo runs a daily pipeline that watches Microsoft's Clarity Android and iOS SDKs and tries to bump + re-wire this package automatically. The flow:
flowchart TD
A[Microsoft ships new Clarity SDK] --> B[06:00 UTC daily<br/>automatic-detect-sdk-updates.yml]
B --> C[Bump PR opened<br/>label: auto-bump]
C --> D[automatic-bump-and-wire.yml:<br/>build binding + diff API + build wrapper]
D --> E{Outcome?}
E -->|API unchanged<br/>wrapper compiles| F[Auto-merge as<br/>stable release]
E -->|API additions<br/>or wrapper breaks| G[Label: needs-wiring<br/>Ping @copilot<br/>with API diff]
E -->|Binding itself broken| H[Label: binding-broken<br/>Ping @copilot<br/>with binding-fix guide]
G --> K[Agent commits wiring]
H --> L{Agent can fix?}
L -->|yes| K
L -->|no| M[Agent adds label:<br/>needs-human]
K --> N[Human review + merge]
M --> N
F --> O[main updated]
N --> O
O --> R[release-please<br/>maintains release PR<br/>for wrapper version]
R --> S[Merge release PR<br/>tags vX.Y.Z]
S --> T[Manually run<br/>publish-*.yml workflows]
T --> U[NuGet.org]
classDef happy fill:#d4edda,stroke:#155724,color:#000
classDef warn fill:#fff3cd,stroke:#856404,color:#000
classDef human fill:#f8d7da,stroke:#721c24,color:#000
class F,O,U happy
class G,H,K warn
class M,N human
The only manual steps for you:
- Review and merge agent wiring PRs when
needs-wiringis applied - Fix binding-generator failures the agent escalates as
needs-human(rare) - Trigger the three
publish-*.ymlworkflows after each release tag
See .github/COPILOT_INSTRUCTIONS.md for the rules the agent follows.
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 | net10.0-android36.0 is compatible. net10.0-ios26.0 is compatible. net10.0-maccatalyst26.0 is compatible. net10.0-windows10.0.19041 is compatible. |
-
net10.0-android36.0
- Kebechet.Maui.MicrosoftClarity.Android (>= 3.8.2)
- Microsoft.Maui.Controls (>= 10.0.1)
- Microsoft.Maui.Controls.Compatibility (>= 10.0.1)
-
net10.0-ios26.0
- Kebechet.Maui.MicrosoftClarity.iOS (>= 3.5.2)
- Microsoft.Maui.Controls (>= 10.0.1)
- Microsoft.Maui.Controls.Compatibility (>= 10.0.1)
-
net10.0-maccatalyst26.0
- Microsoft.Maui.Controls (>= 10.0.1)
- Microsoft.Maui.Controls.Compatibility (>= 10.0.1)
-
net10.0-windows10.0.19041
- Microsoft.Maui.Controls (>= 10.0.1)
- Microsoft.Maui.Controls.Compatibility (>= 10.0.1)
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 |
|---|---|---|
| 4.0.0 | 125 | 5/12/2026 |
| 3.0.2 | 101 | 5/12/2026 |
| 3.0.1 | 221 | 3/26/2026 |
| 3.0.0 | 738 | 2/7/2026 |
| 2.1.0 | 930 | 10/11/2025 |
| 2.0.0 | 4,698 | 4/15/2025 |
| 1.0.8 | 1,874 | 12/16/2024 |
| 1.0.7 | 245 | 11/30/2024 |
| 1.0.6 | 289 | 11/19/2024 |
| 1.0.5 | 315 | 9/10/2024 |
| 1.0.4 | 212 | 9/6/2024 |
| 1.0.3 | 246 | 8/15/2024 |
| 1.0.2 | 223 | 8/7/2024 |
| 1.0.1 | 213 | 7/15/2024 |
| 1.0.0 | 206 | 7/15/2024 |
Fixed Android memory leak: properly dispose SessionStartedCallbackAdapter Java interop objects