Mobile Application Installation (MAUI/Xamarin)
Install ByteHide Monitor in your .NET MAUI or Xamarin mobile application for runtime protection against mobile-specific threats.
Requirements
- .NET MAUI (.NET 7+) or Xamarin (Xamarin.Forms 5.0+)
- NuGet:
ByteHide.Monitorpackage - Target platforms: Android and/or iOS
Step 1: Install the Package
Bash
dotnet add package ByteHide.Monitordotnet add package ByteHide.MonitorStep 2: Configure Monitor
.NET MAUI
C#
using Bytehide.Monitor.Core.Actions;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder.UseMauiApp<App>();
// Configure Monitor
Task.Run(async () =>
{
await Bytehide.Monitor.Payload.ConfigureAsync(config =>
{
config.EnableMobileProtections(ActionType.Close, intervalMs: 60000);
});
});
return builder.Build();
}
}using Bytehide.Monitor.Core.Actions;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder.UseMauiApp<App>();
// Configure Monitor
Task.Run(async () =>
{
await Bytehide.Monitor.Payload.ConfigureAsync(config =>
{
config.EnableMobileProtections(ActionType.Close, intervalMs: 60000);
});
});
return builder.Build();
}
}Xamarin.Forms
C#
using Bytehide.Monitor.Core.Actions;
public partial class App : Application
{
public App()
{
InitializeComponent();
Task.Run(async () =>
{
await Bytehide.Monitor.Payload.ConfigureAsync(config =>
{
config.EnableMobileProtections(ActionType.Close, intervalMs: 60000);
});
});
MainPage = new MainPage();
}
}using Bytehide.Monitor.Core.Actions;
public partial class App : Application
{
public App()
{
InitializeComponent();
Task.Run(async () =>
{
await Bytehide.Monitor.Payload.ConfigureAsync(config =>
{
config.EnableMobileProtections(ActionType.Close, intervalMs: 60000);
});
});
MainPage = new MainPage();
}
}Step 3: Build and Deploy
Bash
dotnet build -f net8.0-android
dotnet build -f net8.0-iosdotnet build -f net8.0-android
dotnet build -f net8.0-iosRecommended Protections for Mobile
C#
config.AddProtection(ProtectionModuleType.JailbreakDetection, ActionType.Close, intervalMs: 60000);
config.AddProtection(ProtectionModuleType.DebuggerDetection, ActionType.Close, intervalMs: 30000);
config.AddProtection(ProtectionModuleType.EmulatorDetection, ActionType.Log, intervalMs: 120000);
config.AddProtection(ProtectionModuleType.TamperingDetection, ActionType.Close, intervalMs: 60000);
config.AddProtection(ProtectionModuleType.NetworkTampering, ActionType.Log, intervalMs: 60000);
config.AddProtection(ProtectionModuleType.MemoryDumpDetection, ActionType.Close, intervalMs: 60000);config.AddProtection(ProtectionModuleType.JailbreakDetection, ActionType.Close, intervalMs: 60000);
config.AddProtection(ProtectionModuleType.DebuggerDetection, ActionType.Close, intervalMs: 30000);
config.AddProtection(ProtectionModuleType.EmulatorDetection, ActionType.Log, intervalMs: 120000);
config.AddProtection(ProtectionModuleType.TamperingDetection, ActionType.Close, intervalMs: 60000);
config.AddProtection(ProtectionModuleType.NetworkTampering, ActionType.Log, intervalMs: 60000);
config.AddProtection(ProtectionModuleType.MemoryDumpDetection, ActionType.Close, intervalMs: 60000);