NativeScript / NativeScript/firebase
initializeApp not working on iOS device
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 62
- フォーク
- 53
- 平均マージ
- 8日 4時間
- マージ済み PR(30日)
- 2
説明
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.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
firebase-core/index.ios.js と main.js の initializeApp 呼び出しから始めます。iOS の起動時に UIApplication.sharedApplication、launchQueue、launchCallback がどのように処理されるかを追跡します。iOS デバイス上で初期化が完了し、既存の成功またはエラーのコールバックに到達すれば完了です。報告された logging シナリオで確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- firebase, ios, typescript
- 領域
- mobile-dev
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100