Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

169
Visualizações
Firebase Remote Config is only fetching default values

I am using react-native-firebase https://rnfirebase.io/remote-config/usage to try fetching my values.

Firebase says it has fetched my values because I am receiving this console log:

"Configs were retrieved from the backend and activated."

BUT - when I try to output just the value I can only see the default values if they are set.

I am aware of the way firebase is caching remote config, but I still cant get it to work by setting a custom cache timeout.

I would love some guidance here, I'm not so sure what I could be doing wrong.

Here is my code which executes on app load.

  async componentDidMount() {
    await remoteConfig()
    .setConfigSettings({
        minimumFetchInterval: 10,
        minimumFetchIntervalMillis: 10000, // 10 secs
        fetchTimeMillis: 10000
    })
    await remoteConfig()
      .setDefaults({
        min_app_version: 1.17,
        test_param: 'disabled'
      })
    //   await remoteConfig().fetch(0);
      await remoteConfig().fetchAndActivate(0)

      .then(fetchedRemotely => {
        if (fetchedRemotely) {
          console.log(
            '+++Configs were retrieved from the backend and activated.',
          );
          console.log(fetchedRemotely);
        } else {
          console.log(
            '+++++No configs were fetched from the backend, and the local configs were already activated',
          );
        }
      });

    //Code to get All parameters from Firebase Remote config
    //ONLY default values show here if they are set
    const parameters = remoteConfig().getAll();
    Object.entries(parameters).forEach($ => {
      const [key, entry] = $;
      console.log('--Key: ', key);
      console.log('--Source: ', entry.getSource());
      console.log('--Value: ', entry.asString());
      console.log('--------------------------------');
    });

    const minAppVersion = remoteConfig().getValue('min_app_version');
    const isApplicationOn = remoteConfig().getBoolean('is_application_on');

    //set value in redux (local storage)
    this.props.minAppVersionFirebaseRemoteConfig(minAppVersion._value)
    console.log(minAppVersion)
    console.log(isApplicationOn)
  }
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda