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

initializeApp not working on iOS device

Aperta
#166 25 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
firebase, ios, typescript
Ambito
mobile-dev

Direzione di ricerca

Inizia da firebase-core/index.ios.js e dalla chiamata a initializeApp in main.js. Traccia come vengono gestiti UIApplication.sharedApplication, launchQueue e launchCallback durante l’avvio di iOS. Il lavoro è completato quando l’inizializzazione va a buon fine su un dispositivo iOS e vengono raggiunti i callback di successo o di errore esistenti; verifica usando lo scenario di logging segnalato.

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

Descrizione

I'm converting an app from the old @nativescript/firebase library, and this is just about complete and fully functional on Android. I just tried running this on iOS, and the app is not initializing properly. In looking through firebase-core/index.ios.js, I've discovered that my initialization request is being added to the launchQueue array, but launchCallback is never being called.

There are no errors shown in the logs, so from what I can see the issue is just that this launchQueue is never being used.

I have the same GoogleService-Info.plist file as before in App_Resources/iOS. These are the relevant parts of the main.js file that's acting as the entry point:

import { firebase } from '@nativescript/firebase-core'
import '@nativescript/firebase-auth';
import '@nativescript/firebase-crashlytics';
import '@nativescript/firebase-analytics';
import '@nativescript/firebase-messaging';

// Initialize Firebase
firebase().initializeApp().then(() => {
  console.warn('🔥 Firebase initialized');
}).catch(error => {
  console.error('🔥 Firebase initialization error: ', error)
});

If I log to the console right before firebase().initializeApp() on iOS I see the log, but the 'Firebase initialized' log never appears. Adding additional logs in firebase-core/index.ios.js shows me that UIApplication.sharedApplication is null when checked, so the call to initApp is appended to the launchQueue array and then never used.

Lingua principale
TypeScript
Stelle
62
Fork
53
Merge medio
8g 4h
PR unite (30g)
2

Guida per i contributori

Apri la guida per i contributori

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 NativeScript/firebase

Tutte le issue di NativeScript/firebase

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.