# Introduce ShakeBugs for .NET MAUI

## Overview

As an mobile app developer, you might ever think if your users can be your app testers who can log an encountered bug with a lot of details for our triage and bug fixing like screenshot, app logs, etc. Sometime, your users also want to give an idea of improvement, but they can't help.

Understanding this paint point, there are many services out there to help us. [ShakeBugs](https://www.shakebugs.com/) is one of them, an SaaS service for collecting and managing bugs and improvements from our app users in production.

This article will guide you how to integrate ShakeBugs SDK into your [.NET MAUI](https://learn.microsoft.com/en-us/dotnet/maui) application step by step.

## Prerequisites

* .NET 8
    
* Java SDK 17
    
* Visual Studio on Windows or Visual Studio for Mac, alternatively
    
    * JetBrains Rider alternatively
        
    * Visual Studio Code with .NET MAUI extension
        
* .NET workloads for .NET MAUI
    

## Steps

### 1/ Create ShakeBugs apps for iOS and Android

Creating ShakeBugs apps is pretty easy, you can simply follow the steps as you go after logging in in [their portal](https://app.shakebugs.com/).

We need to create two apps

* One for Native Android
    
* One for Native iOS
    

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1718354938253/db44f2b0-a659-4ce0-b628-f2001d1fc32c.png align="center")

### 2/ Create a new .NET MAUI project

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1718355088094/a73207af-64c5-42b5-a5e7-4497aeaa0e56.png align="center")

> **NOTE:** Please update all .NET MAUI packages to the latest version (8.0.60 at the time of this writing).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1718355512124/23f2350b-9331-4698-b156-f8751a54347f.png align="center")

> NOTE: As we only target Android and iOS platforms, so we should remove other platforms from our CSPROJ file.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1718355973500/fbb39fbc-da85-44f1-be5f-a21f570b6231.png align="center")

### 3/ Install ShakeBugs for .NET MAUI NuGet package

You can search for `ShakeBugs.Maui` from the NuGet package manager window.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1718355217420/c3ba418c-86a2-4185-af9a-7843e1aebfea.png align="center")

Or you can simply open the CSPROJ file then add these lines

```xml
<PackageReference Include="ShakeBugs.MAUI">
  <Version>17.0.0</Version>
</PackageReference>
```

### 4/ Amend `MauiProgram.cs` to have ShakeBugs enabled

```csharp
builder
    ...
    .UseShakeBugs(
        androidApiKey: "YOUR_ANDROID_API_KEY",
        iosApiKey: "YOUR_IOS_API_KEY",
        crashReportingEnabled: true
    )
    ...
```

### 5/ Voila! Run the app up and shake your device

After you get above steps done, you are now ready to check out ShakeDebugs user interface with two steps

* 1/ Run up the app
    
* 2/ Shake your device
    

## Wrap ups

I just guided you on how to integrate ShakeBugs SDK into a .NET MAUI project. You can follow the steps and add it to your project(s) easily.

[Documents from ShakeBugs](https://docs.shakebugs.com/docs/) are also very helpful, please take a look to understand all features it provides.

If you want to check out the source code of the binding libraries, you can check it [here](https://github.com/tuyen-vuduc/dotnet-binding-utils). If you want to check out the source code of the .NET MAUI library (along with a sample app), you can check it [here](https://github.com/tuyen-vuduc/dotnet-shakebugs-maui).

Happy coding!!!
