/shiny:shiny-pushfrom shiny
Guide for implementing push notifications in .NET MAUI apps using Shiny.Push (native FCM/APNs) and Shiny.Push.AzureNotificationHubs
Ships in shiny. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill when the user needs to:
| Item | Value |
|---|---|
| NuGet (Native Push) | Shiny.Push |
| NuGet (Azure NH) | Shiny.Push.AzureNotificationHubs |
| Primary Namespace | Shiny.Push |
| Config Namespace | Shiny (extension methods on IServiceCollection) |
| Platforms | iOS (APNs), tvOS (APNs, silent/badge only), Android (FCM), Windows (WNS), Blazor WebAssembly (Web Push / VAPID, in the same Shiny.Push package's net10.0 build) |
tvOS registers with APNs and delivers silent (background) pushes exactly as iOS does — IPushDelegate.OnReceived fires and token handling is identical. What tvOS does not have is a notification a user can see or tap:
UNNotificationContent on tvOS carries only a badge count — no title, no body, no user info.UNNotificationResponse, so IPushDelegate.OnEntry is never raised on tvOS and nothing is presented in the foreground. Never generate tvOS code or guidance that relies on OnEntry or on a user tapping a push.RequestAccess() requests UNAuthorizationOptions.Badge alone on tvOS. Do not pass Alert or Sound to the RequestAccess(UNAuthorizationOptions) overload there — they do nothing.IApplePushDelegate.GetPresentationOptions is never called on tvOS.Treat a tvOS push as a signal to go fetch data, not as a message to read.
Register in your MauiProgram.cs:
using Shiny;
builder.Services.AddPush<MyPushDelegate>();
On Android, this uses FirebaseConfig with embedded google-services.json by default. To provide Firebase values manually:
#if ANDROID
builder.Services.AddPush<MyPushDelegate>(FirebaseConfig.FromValues(
appId: "your-app-id",
senderId: "your-sender-id",
projectId: "your-project-id",
apiKey: "your-api-key"
));
#else
builder.Services.AddPush<MyPushDelegate>();
#endif
There is no separate Blazor package - Shiny.Push's net10.0 build carries the Web Push backend (BrowserPushManager). Never reference Shiny.Push.Blazor; it was merged into Shiny.Push in v6.
using Shiny;
using Shiny.Push;
builder.Services.AddShinyCoreServices();
builder.Services.AddPush<MyPushDelegate>(new WebPushOptions
{
VapidPublicKey = "<your VAPID public key>"
// ServiceWorkerPath defaults to "./_content/Shiny.Push/push-sw.js"
});
var host = builder.Build();
await host.Services.UseShiny();
await host.RunAsync();
localhost), a VAPID key pair (send pushes from the backend with the private key), and the service worker. To use your own service worker, importScripts('./_content/Shiny.Push/push-sw.js') from it and point ServiceWorkerPath at yours.Tags is always null on the browser.Supports iOS, Mac Catalyst, macOS and tvOS (APNs), Android (FCM v1), and Windows (WNS) via a single registration call. A hub's APNs settings carry one bundle ID (the APNs topic), so a macOS or tvOS app with its own bundle ID needs its own hub; on tvOS send silent or badge-only payloads.
using Shiny;
builder.Services.AddPushAzureNotificationHubs<MyPushDelegate>(
"Endpoint=sb://...;SharedAccessKeyName=...;SharedAccessKey=...",
"your-hub-name"
);
On Android with custom Firebase config:
#if ANDROID
builder.Services.AddPushAzureNotificationHubs<MyPushDelegate>(
"Endpoint=sb://...",
"your-hub-name",
FirebaseConfig.FromValues("appId", "senderId", "projectId", "apiKey")
);
#endif
The push carries an image URL; Shiny reports it as PushNotification.Notification.ImageUri on every platform.
iOS shows an image only through a Notification Service Extension. Shiny builds one during dotnet build - never
generate an Xcode project, a separate extension csproj, or C# UNNotificationServiceExtension code:
<PropertyGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<ShinyPushServiceExtension>true</ShinyPushServiceExtension>
<!-- optional: payload keys, checked in order; dotted keys walk nested dictionaries -->
<ShinyPushImageKeys>image;fcm_options.image</ShinyPushImageKeys>
</PropertyGroup>
"mutable-content": 1 in aps and an alert, or iOS never runs the extension (silent pushes never do).image, image-url, imageUrl, attachment-url, fcm_options.image (Firebase's apns.fcm_options.image).ShinyPushServiceExtensionInfoPlist merges a plist
with NSAppTransportSecurity into the extension). Max 10 MB (ShinyPushImageMaxBytes). For a private image send a
short-lived signed URL; the extension sends no auth headers.IPushDelegate code does not run in it.$(ApplicationId).NotificationService (override with
ShinyPushServiceExtensionBundleId / ShinyPushServiceExtensionCodesignProvision). Built on macOS only.<ShinyPushServiceExtensionSource Include="MyService.swift" /> replaces the stock Swift; set
ShinyPushServiceExtensionPrincipalClass to its @objc(...) class name.{ "aps": { "alert": { "title": "New photo", "body": "Tap to view" }, "mutable-content": 1 },
"image": "https://cdn.example.com/photo.jpg" }
Android: FCM shows a notification message's notification.image itself while the app is in the background. In the
foreground (or for a data message with an image data key), show it from the delegate:
public override async Task OnReceived(PushNotification push)
{
#if ANDROID
if (push is AndroidPushNotification android)
await android.SendDefaultAsync(1001); // CreateBuilderAsync() + BigPictureStyle + large icon
#endif
}
Web Push (Blazor): the bundled service worker shows the payload's image (Chromium) and reports it as ImageUri.
Server: with Shiny.Extensions.Push set PushNotification.ImageUrl - it adds mutable-content + image for APNs and
notification.image for FCM in one send.
LoadImageAsync() returns the scaled Bitmap for a builder of your own; FirebaseConfig.ImageKeys changes the data
keys. A failed image download never throws - the notification goes out without it.
Always implement IPushDelegate (or subclass PushDelegate) to handle push events. Register it as a generic type parameter on AddPush<T>() or AddPushAzureNotificationHubs<T>().
Request access before using push. Call IPushManager.RequestAccess() and check PushAccessState.Status == AccessState.Available before assuming push is working.
Use PushAccessState.Assert() when you want to throw on denied/restricted permissions rather than checking the status manually.
Multiple delegates are supported. You can register multiple IPushDelegate implementations; all will be called. Register additional delegates as keyed/standard services via services.AddSingleton<IPushDelegate, MyOtherPushDelegate>() or tag the class with [Singleton] from Shiny.Extensions.DependencyInjection.
Apple-specific customization:
IPushManager to IApplePushManager for custom UNAuthorizationOptions.IApplePushDelegate (extends IPushDelegate) to control foreground presentation options and background fetch results.PushNotification may be an ApplePushNotification with access to the raw NSDictionary payload.Android-specific customization:
PushNotification received in OnReceived may be an AndroidPushNotification with access to the native RemoteMessage.AndroidPushNotification.CreateBuilder() to build a NotificationCompat.Builder from the push data.AndroidPushNotification.SendDefault(notificationId) for quick notification display, or SendDefaultAsync(notificationId) / CreateBuilderAsync() to include the push image.FirebaseConfig.DefaultChannel to set a default NotificationChannel.FirebaseConfig.IntentAction to set a custom intent action for notification taps.Tags/Topics:
IPushManager.Tags != null (or use pushManager.IsTagsSupport()) before using tag operations.TrySetTags, TryGetTags, TryRequestAccessWithTags for safe tag operations.Azure Notification Hubs specifics:
IPushInstallationEvent to modify the Installation object (add templates, tags) before it is sent to ANH.AzureNotificationConfig.BeforeSendInstallation callback as an alternative to IPushInstallationEvent.AzureNotificationConfig.ExpirationTime controls token expiration. Each RequestAccess or tag update bumps expiration.AzureNotificationConfig.AzureAuthenticationWaitTimeMs (default 1000ms) adds a delay after registration to allow ANH propagation.Namespace conventions: Extension methods on IServiceCollection live in the Shiny namespace. All push types live in Shiny.Push.
Do NOT reference platform-specific types (e.g., AndroidPushNotification, ApplePushNotification, IApplePushManager, IApplePushDelegate, FirebaseConfig) in shared/cross-platform code. Guard them with #if ANDROID / #if APPLE preprocessor directives or use runtime platform checks.
Notification: Both Shiny.Push and Shiny.Notifications define a Notification type. If both packages are referenced in the same project, do NOT add both namespaces as global usings. Use Shiny.Push.PushNotification or FQN to disambiguate.OnNewToken in your delegate to sync the updated token with your backend server.OnEntry to navigate the user to the appropriate screen when they tap a notification.OnReceived for silent/data-only notifications and background processing. On iOS, ensure content-available: 1 is set in the push payload for background delivery.PushAccessState.Status after RequestAccess() -- do not assume success.RequestAccess().AddPush<TDelegate>() over AddPush() + manual delegate registration to ensure correct service lifetime.AzureAuthenticationWaitTimeMs if you encounter "InstallationId not found" errors.RegistrationToken on IPushManager is the provider-level token (e.g., ANH InstallationId), while NativeRegistrationToken is the raw OS token (FCM token or APNs device token). Use RegistrationToken when communicating with your backend.What SKILL.md sets; muted values are Claude Code's defaults
57 skills in this plugin
/localizegenGenerate strongly-typed localization classes from .resx resource files using Shiny.Extensions.Localization.Generator for .NET applications/shiny-accessorysetupGenerate code using Shiny.BluetoothLE.AccessorySetup - the system accessory pairing sheet for BLE devices (AccessorySetupKit on iOS 18+, CompanionDeviceManager on Android) with no MFi, no location prompt and no general Bluetooth prompt on iOS; picked accessories open as Shiny.BluetoothLE peripherals, and Android adds background presence (device appeared / disappeared) events/shiny-actorsGenerate code using Shiny.Actors — Orleans-style virtual actors without the ceremony, AOT/trim-clean, running anywhere .NET runs including .NET MAUI and Blazor WebAssembly. Covers actor interfaces and source-generated proxies, the ShinyActorBuilder (AddShinyActors), persistent state with ETags, named states and auto-save, event-sourced JournaledActor with snapshots, state and event migrations, typed streams (durable, implicit consumers), timers and persistent reminders (background jobs via Shiny.Jobs, on-time OS notifications via Shiny.Notifications), concurrency control ([Reentrant], [AlwaysInterleave], [ReadOnly], [StatelessWorker]), call filters and request context, OpenTelemetry traces and metrics, remoting over HTTP (Shiny.Net.HttpServer server, RemoteActorSystem client), mDNS discovery of actor servers, Shiny.DocumentDb storage (SQLite, PostgreSQL, IndexedDB...), and the ActorTestHost testing kit./shiny-agesignalsGenerate code using Shiny.AgeSignals to read the user's age range as the app store shares it - Apple Declared Age Range (iOS / macOS 26+) and Google Play Age Signals (Android) - for app store accountability laws (Texas SB 2420, Utah, Louisiana, California AB 1043) and age-gated features/shiny-aiconversationGenerate code for Shiny.AiConversation v3 - session-based AI conversations for .NET over Microsoft.Extensions.AI with persisted, resumable sessions (IAiSessionManager / IAiSession / IAiTurn), streaming replies, the built-in ask_user tool for typed questions and multiple-choice answers, interruption and supersession, usage and context-window pressure tracking, rolling context compaction, silent assistant memory, conversation search, session titles and long-term memory, session interceptors for tools and prompts, pluggable session/memory stores (in-memory or SQLite via Shiny.AiConversation.Stores.SqliteDocDb), and voice conversations via Shiny.AiConversation.Voice (wake word, push-to-talk, follow-up, quiet-word/barge-in interruption, sentence-streamed text-to-speech over Shiny.Speech, acknowledgement modes, sounds, voice selection tools), the MAUI chat UI via Shiny.AiConversation.Maui (AiChatView bound to a session with streaming bubbles, choice chips, push-to-talk and an AiMemoryView), image attachments with retention, and the use_camera tool via Shiny.AiConversation.Maui.Camera, and AG-UI via Shiny.AiConversation.AgUi (a session as an AG-UI event stream for the Shiny AgentView with ask_user questions as interrupts, the render_ui tool for A2UI surfaces, and a remote AG-UI agent as the chat client)/shiny-appdevicebridgeGenerate code using Shiny.AppDeviceBridge, device bridges on your app's own Shiny.Net.HttpServer that also host a web app (Blazor WebAssembly, React, Vue, any static build) inside a .NET MAUI app on Android, iOS, Mac Catalyst, Windows and the maui-labs macOS and Linux heads — served from a loopback HTTP server, updated over the air from a signed release server, GitHub releases or a provider of your own, and given device access through bridges with typed C# and TypeScript clientsnpx claudepluginhub shinyorg/skills --plugin shinyOther plugins' skills for the same job