-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firebase Remote Config - Support multiple Firebase apps with individual namespaces #12876
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
It looks like you need to use the |
@paulb777 .. I tried using this
and I am still not getting the right remote config values for the intended environment (after the runtime switch) |
Here's an example of configuring a non-default app: |
@paulb777 I did some testing using the non-default implementation. Following the sample codes however I am still not getting the remoteConfig values after switching environment.
The iOS app is pointing to the correct Firestore environment, only the remoteConfig is having the issue. The other thing that I read from the |
Right no workaround for that. FirebaseAnalytics only works with the default app #230 |
That is a bummer on the As for the remoteConfig itself, has it ever been proven to be working if we use |
Sorry about the trouble here. Looking at the code in more detail, it seems that a single namespace - I'll follow up with the team to clarify if this is a bug or a missing feature. |
Yes, it turns out that Remote Config manages all Firebase apps in a single namespace, so that the functionality does not work as it would be expected. Changing the behavior would be a large task and not something we can prioritize now. Also, it might break apps relying on the current behavior. I'll rename the issue and we can use it to track thumbs-up requests for proper multi-Firebase app support. |
@paulb777 Thank you for the clarification. It would be great if Firebase can support multi environments (especially for switching environment at runtime) for both Remote Config and Analytics. Sounds like this is a feature that have been requested before as well. It would be a very welcome addition. |
Description
We have an iOS app that allows users to pick target environment at runtime. Each environment has the each own
plist
file, ie GoogleService-Info-Staging.plist or GoogleService-Info-Prod.plist.Whenever user switch environment, I teardown the FIrebase
Then reinitiate the Firebase and RemoteConfig
I am able to see that the
.plist
file for the target environment is being properly passed in and invoked. The FirebaseApp.app() also has different address after the environment is switched.The problem is with the remote config. It always shows the first values being pulled. So for example, if I start with "Staging" env, and then trying to switch to "Production, after the re-initialization process is complete, it keeps showing Staging remote config values.
Questions:
• Did I do the correct steps and procedures to
teardown
the Firebase?• Is there specific steps I need to perform to "reset" the previous
RemoteConfig.remoteConfig()
to make sure it pulls in the correct value when users switch environment?• Does Remote Config support switching environment at runtime?
Reproducing the issue
• Make sure you have different
.plist
file for each target environment• Allow users to switch environments
• When the switch is requested, make sure the proper
plist
is used to create the FirebaseApp.app()• Check that remote config pulls in the right values for a specific environment
Firebase SDK Version
10.24.0
Xcode Version
15.3
Installation Method
Swift Package Manager
Firebase Product(s)
Crashlytics, Firestore, Remote Config
Targeted Platforms
iOS
Relevant Log Output
If using Swift Package Manager, the project's Package.resolved
Expand
Package.resolved
snippetIf using CocoaPods, the project's Podfile.lock
Expand
Podfile.lock
snippetReplace this line with the contents of your Podfile.lock!
The text was updated successfully, but these errors were encountered: