Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

🐛 [@react-native-firebase/installations] Auto-register APNs on iOS when using FID for messaging

Aperta
#9,112 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
ios, javascript, react-native
Ambito
mobile

Direzione di ricerca

Inizia tracciando il modo in cui installations().getId() recupera o sincronizza il FID su iOS, quindi confronta quel percorso con messaging().registerDeviceForRemoteMessages(). Verifica la gestione di FirebaseMessagingInstallationIdEnabled e determina come dovrebbe essere attivata o esposta la registrazione APNs; il lavoro è completato quando un FID iOS ha un token APNs associato senza il workaround manuale e le notifiche non restituiscono più NotRegistered.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Needs Attention platform: ios plugin: installations plugin: messaging type: enhancement Workflow: Needs Review

When targeting devices using Firebase Installation IDs (FIDs) obtained via @react-native-firebase/installations (as recommended in recent Firebase messaging documentation), sending push notifications to iOS devices fails from the backend with a NotRegistered (UNREGISTERED 404) error.

This happens because @react-native-firebase/installations operates independently from APNs. Unlike messaging().getToken()—which automatically handles or triggers APNs device registration under the hood—fetching an FID via installations().getId() does not register the device for remote notifications with Apple.

Because of this, Firebase's backend does not have an APNs token mapped to the FID on iOS, causing notifications to be rejected with NotRegistered.


When FirebaseMessagingInstallationIdEnabled is set to true (or when both @react-native-firebase/messaging and @react-native-firebase/installations are included in the project), the library should either:

  1. Automatically trigger APNs registration (registerDeviceForRemoteMessages()) under the hood when fetching/syncing the FID on iOS.
  2. Or provide an explicit helper method or configuration option within the SDK to automatically bind APNs registration to the FID, ensuring parity with how messaging().getToken() works.

Currently, the workaround on iOS is to manually force APNs registration before utilizing the FID:

import messaging from '@react-native-firebase/messaging';
import installations from '@react-native-firebase/installations';

if (Platform.OS === 'ios') {
  await messaging().registerDeviceForRemoteMessages();
}

const fid = await installations().getId();

Lingua principale
TypeScript
Stelle
12.3k
Fork
2.3k
Merge medio
2g 8h
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di invertase/react-native-firebase

Tutte le issue di invertase/react-native-firebase

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.