Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

rn-push-notifications

/rn-push-notifications

Dodaje do aplikacji Expo i RN powiadomienia push i lokalne: uprawnienia, rejestracja, obsługa na pierwszym planie, po stuknięciu i przy zimnym starcie, deep linking i odznaki.

Repozytorium
dev-flow ↗
Licencja
MIT
Ostatnia zmiana repozytorium
22.10.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
5
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 22.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Dodaje do aplikacji Expo i RN powiadomienia push i lokalne: uprawnienia, rejestracja, obsługa na pierwszym planie, po stuknięciu i przy zimnym starcie, deep linking i odznaki.

Wyzwalacze z opisu

add push notificationslocal notificationdeep link from notificationiOS/Android push setupregister for notifications
Oryginalny opis (EN)

Use when adding push or local notifications to an Expo + RN app: requesting permissions at the right moment, registering for push (Expo push service in dev, APNs/FCM direct in prod), handling foreground + tapped + cold-start notifications, deep linking from a notification payload to a specific route, scheduling local notifications, badge management. Triggers on: "add push notifications", "local notification", "deep link from notification", "iOS/Android push setup", "register for notifications". Not for: backend setup that sends the notifications (rn-backend), animations on a notification badge

Jak działa

  1. The 5 rules (non-negotiable)
  2. Quick decision tree
  3. Common anti-patterns (NEVER do)
  4. Sources
Sekcje z nagłówków SKILL.md, w oryginale · 34 linii, 309 słów
Podgląd SKILL.md
---
name: rn-push-notifications
description: 'Use when adding push or local notifications to an Expo + RN app: requesting permissions at the right moment, registering for push (Expo push service in dev, APNs/FCM direct in prod), handling foreground + tapped + cold-start notifications, deep linking from a notification payload to a specific route, scheduling local notifications, badge management. Triggers on: "add push notifications", "local notification", "deep link from notification", "iOS/Android push setup", "register for notifications". Not for: backend setup that sends the notifications (rn-backend), animations on a notification badge (rn-animations-gestures).'
---

# rn-push-notifications — guardrail for push + local notifications

> For the current Expo API and per-version details, verify against the Expo docs / MCP `mcp.expo.dev` / `expo/skills` (see rn-fundamentals → Source of truth).

## The 5 rules (non-negotiable)

1. **`expo-notifications` is the SDK**. Don't pull `@react-native-firebase/messaging` directly — Expo wraps APNs+FCM. Bare FCM is needed only for the rare case where you ship without Expo.
2. **Request permission AT THE RIGHT MOMENT**, not at app launch. Wait for a clear opt-in trigger (signup complete, settings screen, feature first use).
3. **Setup `setNotificationHandler` at module level** in `app/_layout.tsx`, ONCE. Not inside any component.
4. **Handle the 3 entry paths**: foreground (`addNotificationReceivedListener`), tapped while alive (`addNotificationResponseReceivedListener`), tapped on cold start (`getLastNotificationResponseAsync`).
5. **Token storage**: send the Expo push token to YOUR backend via authenticated HTTPS POST. Never store the raw token in AsyncStorage — use `expo-secure-store` or treat it as server-owned.

## Quick decision tree

- "Expo push service or direct APNs/FCM?" → `references/decision-tree.md`
- "How do I wire up the handlers + deep linking?" → `references/patterns.md`
- "What's the app.json / config plugin setup?" → `references/setup.md`

## Common anti-patterns (NEVER do)

- ❌ `Notifications.requestPermissionsAsync()` in `app/_layout.tsx` on first render — bad UX (denied permanently if user says no by mistake).
- ❌ `setNotificationHandler` inside a screen component — runs on every mount, last one wins.
- ❌ Sending the Expo push token over plain HTTP — token = ability to spam the user.
- ❌ Reading `notification.request.content.data` without type-narrowing — runtime error on malformed payload.
- ❌ Forgetting `getLastNotificationResponseAsync` on cold start — deep link from tapped notification gets lost.
- ❌ Storing badge count in client state only — server is source of truth; client subtracts on read.

## Sources

- Course: codewithbeto.dev/rnCourse — "Push Notifications" module (1 lesson free, rest paid).
- Official: https://docs.expo.dev/push-notifications/overview/
- Official: https://docs.expo.dev/versions/latest/sdk/notifications/
Pliki w paczce (5)
  • SKILL.md 3 KB
  • references/.gitkeep 1 KB
  • references/decision-tree.md 4 KB
  • references/patterns.md 7 KB
  • references/setup.md 3 KB

Wersje

W bazie nie ma innych skilli o nazwie rn-push-notifications.

Migawka bazy z 28.10.2026 · wersja paczki 50b18106d693 (skrót SHA-256 całej paczki)

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100expo-notifications
    Pomaga skonfigurować expo-notifications: tokeny push, certyfikaty FCM i APNs, kategorie, zaplanowane powiadomienia, kanały i przepływ uprawnień.
  • 100push-notifications
    Pomaga budować powiadomienia push w sieci i na urządzeniach mobilnych z Firebase Cloud Messaging, APNs, Web Push API i Expo Notifications oraz projektować ich architekturę.
  • 100push-notifications
    Buduje zdalne powiadomienia push na expo-notifications: uprawnienie w kontekście, synchronizacja tokenów, kontrakt z serwerem, kanały i obsługa dotknięcia powiadomienia.
  • 90mobile-push-notifications
    Pomaga wdrożyć powiadomienia push na iOS, Androidzie, Flutterze i React Native: uprawnienia, tokeny, payloady i kanały.
  • 90mobile-notifications
    Wdraża i sprawdza powiadomienia push i lokalne: FCM, APNs, tokeny, uprawnienia, kanały i nawigację po kliknięciu.
  • 100maui-local-notifications
    Dodaje powiadomienia lokalne do aplikacji .NET MAUI na Androidzie, iOS i Mac Catalyst: kanały, uprawnienia, planowanie, obsługa pierwszego planu i tła oraz rejestracja w DI.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.