Core / Initialization
Firebase must be initialized before any service (Auth, Firestore, etc.) can be used. The FirebaseCorePlugin handles this automatically when the FirebaseIOS autoload starts.
How It Works
When the plugin is enabled, the FirebaseIOS autoload runs this sequence in _ready():
- Core —
FirebaseCorePlugin.initialize()loadsGoogleService-Info.plistand callsFirebaseApp.configure() - Auth —
FirebaseAuthPluginis instantiated and its signals are connected - Firestore —
FirebaseFirestorePluginis instantiated, signals are connected, and Firestore is initialized - Remote Config —
FirebaseRemoteConfigPluginis instantiated and its signals are connected - Analytics —
FirebaseAnalyticsPluginis instantiated (fire-and-forget, no signals)
All of this happens automatically. You do not need to call initialize() yourself.
Signals
These signals are available on the FirebaseIOS autoload directly:
-
firebase_initializedEmitted whenFirebaseApp.configure()succeeds. At this point all services are ready to use. -
firebase_error(message: String)Emitted if initialization fails (e.g.,GoogleService-Info.plistis missing from the app bundle).
func _ready() -> void:
FirebaseIOS.firebase_initialized.connect(_on_firebase_ready)
FirebaseIOS.firebase_error.connect(_on_firebase_error)
func _on_firebase_ready() -> void:
print("Firebase is ready!")
func _on_firebase_error(message: String) -> void:
printerr("Firebase init failed: ", message)
GoogleService-Info.plist
The GoogleService-Info.plist file from your Firebase console must be included in the iOS app bundle. The plugin’s export script handles this automatically — just place the file in addons/GodotFirebaseiOS/.
If the file is missing at runtime, firebase_error will be emitted with an explanatory message.
Architecture
FirebaseIOS (Autoload)
├── core → FirebaseCorePlugin (FirebaseApp.configure)
├── auth → FirebaseAuthPlugin (Authentication)
├── firestore → FirebaseFirestorePlugin (Cloud Firestore)
├── remote_config → FirebaseRemoteConfigPlugin (Remote Config)
└── analytics → FirebaseAnalyticsPlugin (Analytics)
Each service plugin is independent — Auth and Firestore are peers, neither depends on the other. They only require that Core has initialized Firebase first, which the autoload guarantees.