-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix Remote Config pre-configure access. #9551
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
Conversation
Currently, when `RemoteConfig.remoteConfig()` is called before `FirebaseApp.configure()` is called, Similar to Database, AppCheck, and others we'll now throw an ObjC exception. We're not going to make it nullable or throw a Swift compatible error since it'd affect the callsite of every usage (either a `?` or `try`) and this is deemed a programming error: `configure()` has to be called first. Fixes #8640
[NSException raise:@"FIRAppNotConfigured" | ||
format:@"The default `FirebaseApp` instance must be configured before the " | ||
@"default Remote Config instance can be initialized. One way to ensure this " | ||
@"is to call `FirebaseApp.configure()` in the App Delegate's " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Should AppDelegate be unspaced?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is consistent with the other products, I guess it's a hybrid of Apple's (they have a space but non capitalized, or no space and capitalized) https://developer.apple.com/documentation/uikit/uiapplicationdelegate.
Can change if you feel strongly about it but thought I'd keep it for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to merge, will follow up on another PR if you think it's worth changing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM - not a strong view and I trust your judgement
* Fix Remote Config pre-configure access. Currently, when `RemoteConfig.remoteConfig()` is called before `FirebaseApp.configure()` is called, Similar to Database, AppCheck, and others we'll now throw an ObjC exception. We're not going to make it nullable or throw a Swift compatible error since it'd affect the callsite of every usage (either a `?` or `try`) and this is deemed a programming error: `configure()` has to be called first. Fixes #8640 * CHANGELOG
Currently, when
RemoteConfig.remoteConfig()
is called beforeFirebaseApp.configure()
is called, Similar to Database, AppCheck, andothers we'll now throw an ObjC exception. We're not going to make it
nullable or throw a Swift compatible error since it'd affect the
callsite of every usage (either a
?
ortry
) and this is deemed aprogramming error:
configure()
has to be called first.Fixes #8640