-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(remote-config)!: API update to match web SDK #3537
Conversation
…react-native-firebase into @russell/remote-config-rework
…react-native-firebase into @russell/remote-config-rework
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.
Minor feedback, ta
Minor points above re the types should be Also, there's 3 methods missing from |
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.
Minor points above re the types should be Promise<void>
to match the Web SDK, fetch()
also not in review above needs to be Promise<void>
also; https://github.com/invertase/react-native-firebase/pull/3537/files#diff-a974aa1fe8536324f6b55551e53f184eR417
Also, there's 3 methods missing from firebase.remoteConfig().X
, getBoolean, getNumber, getString, these are just convenience methods so JS only, should be fairly quick to add to types and JS; e.g. getBoolean(key)
fn would just be return this.getValue(key).asBoolean();
Co-authored-by: Mike Diarmid <mike.diarmid@gmail.com>
…react-native-firebase into @russell/remote-config-rework
RemoteConfig Module
Updates
ensureInitialized
API.reset
API for android onlyconsole.warn()
if user tries to setdefaultConfig
which is part of web sdk.console.warn()
if user tries to setsettings
which is part of web sdk.console.warn()
if user tries to setsetLogLevel
which is part of web sdk.RemoteConfig.setConfigSettings()
Updates
setConfigSettings
to match web sdk.setConfigSettings
to match web sdk.Removed
isDeveloperModeEnabled
from config settings and console.warn() if tried to set.minimumFetchInterval
config setting and console.warn() if tried to set.RemoteConfig.getValue(key)
Updates
asBoolean()
resolves value to a boolean.asNumber()
resolves value to a number.asString()
resolves value to a string.getSource()
source of the property.Removed
value
removed property. Not sure how to warn users it is no longer availablesource
removed property. Again, not sure how to warn users.Internal Changes
setConfigSettingsAsync
for Android, nothing similar for iOS.fetchAndActivate
API for both platforms.activate
API for iOS. No changes needed for Android.