davidortinau/maui-skills/maui-push-notifications
Claude Code and agent skill by davidortinau/maui-skills
- community
Checking that the SKILL.md file is still in the repository.
End-to-end guide for adding push notifications to .NET MAUI apps. Covers Firebase Cloud Messaging (Android), Apple Push Notification Service (iOS), Azure Notification Hubs as the cross-platform broker, an ASP.NET Core backend API, and the MAUI client wiring on every platform. USE FOR: "push notification", "FCM", "APNS", "Firebase Cloud Messaging", "Azure Notification Hubs", "device registration", "remote notification", "send push notification", "notification token". DO NOT USE FOR: local/scheduled notifications (use maui-local-notifications), general permission handling (use maui-permissions), or background tasks without notifications (use maui-app-lifecycle).
Install
npx vskill@latest install davidortinau/maui-skills/maui-push-notificationsSKILL.md
Push Notifications — Gotchas & Best Practices
Troubleshooting Table
| Issue | Cause | Fix | |
|---|---|---|---|
| Token changes every debug run (Android) | Debug builds regenerate Firebase tokens | Always re-register in OnNewToken | |
HttpClient requests fail silently | BaseAddress missing trailing / | Ensure endpoint ends with / | |
| iOS push won't arrive on simulator | Simulators don't support APNS | Use a physical iOS device | |
| No notifications on Android 13+ | POST_NOTIFICATIONS required (API 33+) | Call RequestPermissions in OnCreate | |
| Notification channel missing (API 26+) | Android requires explicit channel creation | Create channel before sending | |
SendNotificationAsync throws for >20 tags | Azure NH tag expression limit | Batch tags in groups of 20 | |
422 on device registration | Platform string mismatch | Use "fcmv1" (not "gcm") and "apns" | |
Token empty at RegisterAsync | Race condition on cold start | Guard with IsNullOrWhiteSpace check |
Critical Gotchas
⚠️ BaseAddress trailing slash
HttpClient.BaseAddress must end with /. Without it, relative URI resolution silently breaks.
⚠️ Android: Always re-register on token refresh
Firebase tokens regenerate frequently in debug builds. If you skip OnNewToken, the backend holds a stale token and pushes silently fail.
⚠️ Android 13+ requires POST_NOTIFICATIONS permission
Without explicitly requesting POST_NOTIFICATIONS on API 33+, notifications are silently dropped.
⚠️ Azure NH tag expression limit: 20 tags
SendNotificationAsync throws if a tag expression references more than 20 tags. Batch into chunks:
⚠️ Use "fcmv1" not "gcm"
The legacy "gcm" platform string causes 422 errors on device registration. Always use "fcmv1" for Android and "apns" for iOS.
⚠️ iOS simulators cannot receive push notifications
APNS only works on physical iOS devices. Simulators silently ignore push registrations.
Platform Checklist
Android
- [ ]
google-services.jsoninPlatforms/Android/with<GoogleServicesJson>in.csproj - [ ]
Xamarin.Firebase.MessagingNuGet package added (Android-only condition) - [ ]
POST_NOTIFICATIONSpermission requested on API 33+ - [ ] Notification channel created before first notification (API 26+)
- [ ]
OnNewTokenalways callsRegisterAsync - [ ]
FirebaseMessagingServiceregistered in manifest withMESSAGING_EVENTintent filter
iOS
- [ ] Push Notifications capability enabled in Apple Developer portal
- [ ] APNs key (
.p8) uploaded to Azure Notification Hub - [ ]
Entitlements.plistwithaps-environmentset todevelopmentorproduction - [ ]
CodesignEntitlementsset in.csproj - [ ]
RegisterForRemoteNotificationscalled on main thread after authorization grant - [ ] Device token converted to lowercase hex string (no dashes)
Backend
- [ ] Azure Notification Hub configured with FCM V1 JSON and APNS key
- [ ]
BaseAddressends with trailing/ - [ ] Tag expressions batched in groups of ≤20
- [ ] Platform strings:
"fcmv1"and"apns"(not legacy values)
Architecture Overview
See references/push-notifications-api.md for full implementation templates.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/maui-skills/skills/maui-push-notifications/SKILL.md
Popularity
- Repository stars
- 132
- Repository forks
- 16
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 5 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/davidortinau/maui-skills/maui-push-notifications)