-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remote Config: inaccurate nullability annotations #8640
Comments
We should likely throw an exception here to alleviate this: firebase-ios-sdk/FirebaseRemoteConfig/Sources/FIRRemoteConfig.m Lines 104 to 105 in d4c4e8c
|
ryanwilson
added a commit
that referenced
this issue
Mar 31, 2022
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
ryanwilson
added a commit
that referenced
this issue
Mar 31, 2022
* 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
Fixed in #9551 which is merged to the Firebase 9 branch. |
paulb777
pushed a commit
that referenced
this issue
Apr 4, 2022
* 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In Firebase 8 the Remote Config API has the following inaccurate nullability annotations:
nonnull
but the implementation actually can returnnil
nonnull
but the implementation can returnnil
The inaccurate nullability annotations prevent safe handling of the
nil
cases in Swift.This is a breaking change, so will require a major version bump.
The text was updated successfully, but these errors were encountered: