Currently, each Firebase module (e.g., Account, Storage, Firestore) has their own way of passing emulator configuration. This often times makes the configuration section pretty verbose, if you conditionally configure the emulator settings. This could also introduce errors as you have to ensure that you pass the same options in both cases.
Provide a dedicated FirebaseEmulator module that receive the emulator configurations for all Firebase emulators. This can be configured in a single if statement in the configuration of the SpeziAppDelegate. All Firebase modules can create a dependency to this DefaultInitializable module to retrieve the emulator configuration.
Additional context
We could keep the existing initializers and mark them deprecated or just remove them as part of a breaking change with the upcoming 2.0 release.
Code of Conduct
[X] I agree to follow this project's Code of Conduct and Contributing Guidelines
Problem
Currently, each Firebase module (e.g., Account, Storage, Firestore) has their own way of passing emulator configuration. This often times makes the configuration section pretty verbose, if you conditionally configure the emulator settings. This could also introduce errors as you have to ensure that you pass the same options in both cases.
This problem was first discussed in https://github.com/StanfordSpezi/SpeziFirebase/pull/39#discussion_r1718807482
Solution
Provide a dedicated
FirebaseEmulator
module that receive the emulator configurations for all Firebase emulators. This can be configured in a single if statement in the configuration of theSpeziAppDelegate
. All Firebase modules can create a dependency to thisDefaultInitializable
module to retrieve the emulator configuration.Additional context
We could keep the existing initializers and mark them deprecated or just remove them as part of a breaking change with the upcoming 2.0 release.
Code of Conduct