arnesson / cordova-plugin-firebase

Cordova plugin for Google Firebase
http://arnesson.github.io/cordova-plugin-firebase
MIT License
1.01k stars 1.56k forks source link

ionic 3 - Firebase -setDefaults/activateFetched #622

Open NurGuz23 opened 6 years ago

NurGuz23 commented 6 years ago

Hi guys,

setDefaults don't do nothig. And activateFetched is always desactivated

` var defaults = { // map property name to value in Remote Config defaults mLong: 1000, mString: 'hello world', mDouble: 3.14, mBoolean: true }

    this._firebase.setDefaults(defaults, 'namespace');

    this._firebase.fetch(60).then(() => {
      this._firebase.activateFetched().then((activated) => {
        alert(activated);
        if (activated) {
          this._firebase.getValue("force_update_current_version").then((value) => {
            alert("FirebasePlugin.getValue " + value);                }, function (error) {
              console.log("FirebasePlugin.getValue error " + error);
            });
          }, function (error) {
            console.error(error);
          });
        }
        else
          alert('no está activado');
      });
    }).catch((err) => {
      alert(err.Message);
    });`
agrosner commented 6 years ago

I appears that there is no setDefaults method in the FirebasePlugin.h nor the FirebasePlugin.m file in iOS. It doesn't do anything which is really a bug. On Android its there and it works.