Niobium.Platform.Notification.Apple 4.2.66

dotnet add package Niobium.Platform.Notification.Apple --version 4.2.66
                    
NuGet\Install-Package Niobium.Platform.Notification.Apple -Version 4.2.66
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Niobium.Platform.Notification.Apple" Version="4.2.66" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Niobium.Platform.Notification.Apple" Version="4.2.66" />
                    
Directory.Packages.props
<PackageReference Include="Niobium.Platform.Notification.Apple" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Niobium.Platform.Notification.Apple --version 4.2.66
                    
#r "nuget: Niobium.Platform.Notification.Apple, 4.2.66"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Niobium.Platform.Notification.Apple@4.2.66
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Niobium.Platform.Notification.Apple&version=4.2.66
                    
Install as a Cake Addin
#tool nuget:?package=Niobium.Platform.Notification.Apple&version=4.2.66
                    
Install as a Cake Tool

Niobium.Platform.Notification.Apple

Niobium.Platform.Notification.Apple provides an Apple Push Notification (APNs) channel implementation for the Niobium notification framework. It enables .NET applications to send push notifications to iOS/macOS devices using Apple��s secure APNs infrastructure, supporting both alert and background notifications.

What is this project about?

  • Implements an APNs push notification channel for Niobium.Platform.Notification.
  • Supports both alert and background push notifications.
  • Handles JWT-based authentication with Apple using ES256 keys.
  • Provides abstractions for credentials, notification payloads, and channel configuration.
  • Designed for extensibility and integration with Niobium's notification infrastructure.

Getting Started

1. Install the NuGet Package

Add the package to your .NET project:

dotnet add package Niobium.Platform.Notification.Apple

2. Register the Apple Push Notification Channel

In your DI setup, register your implementation of the Apple push notification channel:

using Niobium.Platform.Notification.Apple;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
services.AddSingleton<ApplePushNotificationChannel, MyApplePushNotificationChannel>();

Replace MyApplePushNotificationChannel with your own implementation that provides credentials and message formatting.

3. Configure Apple Push Credentials

Implement the logic to provide your Apple Team ID, Key ID, and private key (in PKCS8 format):

public class MyApplePushNotificationChannel : ApplePushNotificationChannel
{
    // ... constructor ...

    protected override Task<ApplePushCredential> GetCredentialAsync(NotificationContext context)
    {
        return Task.FromResult(new ApplePushCredential
        {
            TeamID = "<your-team-id>",
            KeyID = "<your-key-id>",
            Key = "<your-base64-private-key>"
        });
    }

    protected override Task<IEnumerable<ApplePushNotification>> GetMessagesAsync(
        string brand, int templateID, NotificationContext context, IReadOnlyDictionary<string, object> parameters)
    {
        // Build and return ApplePushNotification objects
    }
}

4. Send Push Notifications

Use the notification service to send push notifications:

var notificationService = serviceProvider.GetRequiredService<INotificationService>();
await notificationService.SendAsync(
    channel: "ApplePush",
    parameters: new NotificationParameters { /* ... */ },
    cancellationToken);

5. Alert and Background Notifications

  • For alert notifications, set Background = false and provide a string message.
  • For background notifications, set Background = true and provide a payload object.

How Niobium.Platform.Notification.Apple is Consumed

Consumer projects use Niobium.Platform.Notification.Apple to:

  • Register and use Apple push notification channels via DI.
  • Send transactional and workflow push notifications to iOS/macOS devices.
  • Integrate APNs delivery into multi-channel notification workflows.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with clear commit messages
  4. Submit a pull request

Please ensure your code follows the existing style and includes appropriate tests and documentation.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.2.66 82 9/4/2026
4.0.60 88 8/30/2026
4.0.42 124 7/18/2026
4.0.37 106 7/17/2026
4.0.35 112 7/17/2026
4.0.34 114 7/17/2026
4.0.33 112 7/16/2026
4.0.32 117 7/2/2026
3.4.30 209 12/22/2025
3.4.29 317 11/11/2025
3.4.28 187 11/2/2025
3.4.27 154 11/1/2025
3.4.26 146 11/1/2025
3.4.25 148 11/1/2025
3.4.24 185 10/31/2025
3.2.23 138 10/18/2025
3.2.22 174 10/17/2025
3.2.21 171 10/17/2025
3.2.20 206 10/14/2025
3.2.19 209 9/30/2025
Loading failed