.NET MAUI Push Notifications in C#

C#, .NET 10. Android uses Firebase; iOS uses PushKit + CallKit directly.

🟣 .NET MAUI

C#, .NET 10. Android uses Firebase; iOS uses PushKit + CallKit directly.

Download the SDK from the dashboard (Integration guide) after you create a free account.

  1. Add the SDK to your solution

    Unzip the download into your solution folder (this creates PushConsoleSDK/), reference the project and declare the Firebase file for Android:

    MyApp.csproj
    <!-- MyApp.csproj -->
    <ItemGroup>
      <ProjectReference Include="PushConsoleSDK\maui\PushConsole.Maui\PushConsole.Maui.csproj" />
    </ItemGroup>
    
    <ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
      <GoogleServicesJson Include="Platforms\Android\google-services.json" />
    </ItemGroup>

    Requires .NET 10 / MAUI 10. For .NET 9 apps, change TargetFrameworks in PushConsole.Maui.csproj. In TingPush: upload the service account JSON (Android) and the .p8 key (iOS).

  2. Initialize in MauiProgram

    MauiProgram.cs
    using PushConsoleSdk;
    
    public static MauiApp CreateMauiApp()
    {
        var builder = MauiApp.CreateBuilder();
        builder
            .UseMauiApp<App>()
            .UsePushConsole(new PushConsoleOptions
            {
                AppId = "YOUR_APP_ID",
                ServerUrl = "https://tingpush.com",
                TextAnswer = "Answer",
                TextDecline = "Decline"
            });
        return builder.Build();
    }
  3. iOS: change the AppDelegate base class, enable VoIP

    Platforms/iOS/AppDelegate.cs
    // Platforms/iOS/AppDelegate.cs
    [Register("AppDelegate")]
    public class AppDelegate : PushConsoleSdk.PushConsoleAppDelegate   // instead of MauiUIApplicationDelegate
    {
        protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
    }
    Platforms/iOS
    <!-- Platforms/iOS/Info.plist -->
    <key>UIBackgroundModes</key>
    <array>
      <string>remote-notification</string>
      <string>voip</string>
    </array>
    
    <!-- Platforms/iOS/Entitlements.plist  (csproj: <CodesignEntitlements>Platforms/iOS/Entitlements.plist</CodesignEntitlements>) -->
    <key>aps-environment</key>
    <string>development</string>

    Enable Push Notifications for the App ID in Apple Developer. Release builds: aps-environment = production.

  4. Handle events & assign the user

    App.xaml.cs
    using PushConsoleSdk;
    
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();
    
            PushConsole.CallEvent += (_, e) =>
            {
                if (e.Action == PushConsoleCallAction.Accepted)
                {
                    // User tapped Answer → connect the call (e.Call.Id, e.Call.Data["room"])
                }
            };
            PushConsole.NotificationOpened += (_, e) => { /* navigate using e.Data */ };
        }
    
        protected override void OnStart()
        {
            // Android: Answer tapped while the app was closed
            if (PushConsole.TakeAcceptedCall() is { } call) { /* connect the call */ }
        }
    }
    
    // Assign the user
    await PushConsole.LoginAsync("user-123");
    await PushConsole.LogoutAsync();
    await PushConsole.SetTagsAsync(new Dictionary<string, string> { ["plan"] = "vip" });

    Android: keep LaunchMode = LaunchMode.SingleTop on MainActivity (the template default). CanUseFullScreenIntent() and OpenBatteryOptimizationSettings() are available.

✅ After integrating, check

  1. Run the app on a real device with logging on: you should see [PushConsole] Device registered ….
  2. The project's Devices tab: the device appears; iOS devices show the VoIP badge if you use calls.
  3. The Send tab: send a test to that device.
  4. Choose 📞 Call and test with the app open, closed and with the screen locked.

Ready to integrate?

Create an account to get your App ID and API Key and download the SDKs. Dashboard samples are pre-filled with your project details.