Comments (10)
Right no workaround for that. FirebaseAnalytics only works with the default app #230
from firebase-ios-sdk.
Sorry about the trouble here. Looking at the code in more detail, it seems that a single namespace - FIRNamespaceGoogleMobilePlatform
is used for all apps.
I'll follow up with the team to clarify if this is a bug or a missing feature.
from firebase-ios-sdk.
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
from firebase-ios-sdk.
It looks like you need to use the remoteConfig(app:)
API
from firebase-ios-sdk.
@paulb777 .. I tried using this
guard let app = FirebaseApp.app() else { return }
remoteConfig = RemoteConfig.remoteConfig(app: app)
and I am still not getting the right remote config values for the intended environment (after the runtime switch)
from firebase-ios-sdk.
Here's an example of configuring a non-default app:
from firebase-ios-sdk.
@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.
public init(plist: Plist) {
guard let plistPath = Bundle.module.path(forResource: plist, ofType: "plist"),
let firebaseOptions = FirebaseOptions(contentsOfFile: plistPath)
else {
fatalError("π₯ Invalid GoogleService plist info")
}
FirebaseApp.configure(name: appName, options: firebaseOptions)
guard let app = FirebaseApp.app(name: appName)
else {
fatalError()
}
Self.firebaseApp = app
self.firestoreConfiguration = FirestoreConfiguration(app: app)
Self.config = RemoteConfig.remoteConfig(app: app)
}
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 remoteConfig(app:)
API, this will cause FirebaseAnalytics
to not working with non-default app. We use FirebaseAnalytics on our app. Is there no workaround for this?
from firebase-ios-sdk.
That is a bummer on the FirebaseAnalytics
.
As for the remoteConfig itself, has it ever been proven to be working if we use remoteConfig(app:)
it can support changing environment at runtime?
from firebase-ios-sdk.
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.
from firebase-ios-sdk.
@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.
from firebase-ios-sdk.
Related Issues (20)
- Linker command failed with exit code 1 (use -v to see invocation) HOT 5
- NSGenericException in `InstrumentUploadTaskWithStreamedRequest` HOT 2
- Nightly Testing Report HOT 1
- γγ«γγ¨γ©γΌγFirebaseCore/FirebaseCore.hγγγ‘γ€γ«γθ¦γ€γγγΎγγγ HOT 2
- iOS app crash on FBLPromise observeOnQueue:fulfill:reject: HOT 5
- iOS app crash on FIRMessagingTokenOperation HOT 2
- iOS app crash on FBLPromise(DoAdditions) onQueue:do: HOT 2
- CRASH When I call FirebaseApp.configure HOT 3
- Add Firebase in iOS Custom Keyboard Extension HOT 4
- Nightly Testing Report HOT 1
- Nightly Testing Report HOT 1
- [FR]: Mark Firebase Dynamic Links as deprecated in the iOS SDK
- Add the file privacy manifet policies in that version HOT 2
- Nightly Testing Report
- [FR]: Add Vertex AI Vision & Audio Sample Code for iOS HOT 2
- Nightly Testing Report HOT 5
- SwiftUI views | Firebase performance | Automatic screen tracking : Screen rendering tab not showing SwiftUI views HOT 1
- Update GoogleUtilities major version along with Firebase 11 HOT 1
- Callbacks are not called when client is offline HOT 4
- unable to upload dsym to crashlytics via terminal command HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebase-ios-sdk.