chemerisuk / cordova-plugin-firebase-config Goto Github PK
View Code? Open in Web Editor NEWCordova plugin for Firebase Remote Config
License: MIT License
Cordova plugin for Firebase Remote Config
License: MIT License
Took a day to upgrade to cordova 9.0.0 and nodejs to 14+ to be able to use this plugin.
Had to add a bunch of modules manually, not sure why. ---
Trying to build dev android app fails
> Task :app:compileDebugJavaWithJavac FAILED
/home/app/dev/Ionic-app/apps/gf-mobile-mobileapps/card-control/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:638: error: cannot find symbol
final boolean activated = FirebaseRemoteConfig.getInstance().activateFetched();
^
symbol: method activateFetched()
location: class FirebaseRemoteConfig
/home/app/dev/Ionic-app/apps/gf-mobile-mobileapps/card-control/platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:684: error: cannot find symbol
byte[] bytes = FirebaseRemoteConfig.getInstance().getByteArray(key);
^
Not sure what else to try?
I couldn't install this plugin because I'm using [email protected]
If I upgrade up to [email protected] it made many issues.
As you know [email protected] have many issues which there many plugin doesn't support.
If possible, please downgrade this plugin to [email protected]?
Thank you!
Hi Maksim,
Thanks for investing the time in making this plugin.
Could you possibly create a demo app and outline the steps that need to be done in order to get this actually working? Like, how do we setup the GoogleService-Info.plist
file - is it needed?
I'm asking because I added the plugin to my demo Ionic project, set GoogleService-Info.plist
in the root folder, and used:
if (window.cordova && window.cordova.plugins.firebase.config) {
cordova.plugins.firebase.config.update(8 * 3600).then(function() {
alert("your config was updated");
});
}
but I don't get an alert.
Any help is welcome, thank you!
Thanks for your hard work so far, would be great to be able to set setDeveloperModeEnabled
to eliminate remote config cache on fetch method
Hello, in advance I thank this project very much since I have been using it for quite some time. My query is the sgt:
Tested on a Samsung 4.4
Upon adding the plugin and trying to run an ios cordova build, I am getting a build failed error:
'GoogleUtilities/GULAppEnvironmentUtil.h' file not found
#import <GoogleUtilities/GULAppEnvironmentUtil.h>
Any Ideas on this one?
Thanks
Thank you for creating this plugin, i would really like to use it in an ionic app. The problem here is that i'm trying to integrate using capacitor trough ionic-native and after following the installation instructions I'm getting the error described here:
danielsogl/awesome-cordova-plugins#3341
Could you please support?
Hi. We started experiencing build errors for iOS related to Firebase and this plugin out of the blue recently (May 24th). Are you aware of anything external that might of changed that would have triggered this?
While building module 'Firebase' imported from Plugins/cordova-plugin-firebase-config/FirebaseConfigPlugin.h:2:
In file included from <module-includes>:1:
ios/platforms/ios/Pods/Firebase/CoreOnly/Sources/Firebase.h:1:9: fatal error: 'FirebaseCore/FirebaseCore.h' file not found
#import <FirebaseCore/FirebaseCore.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Plugins/cordova-plugin-firebase-config/FirebaseConfigPlugin.m:1:
Plugins/cordova-plugin-firebase-config/FirebaseConfigPlugin.h:2:9: fatal error: could not build module 'Firebase'
@import Firebase;
~~~~~~~^~~~~~~~
2 errors generated.
** BUILD FAILED **
Version 1.2.1.
Hi and thanks for your great cordova plugins !
After updating to 2.0.3, I get a build error (details below).
Node version: v12.3.1
Cordova version: 8.1.1
Cordova Android Platform: 7.1.4
Gradle version: 5.4.1
Available Android targets:
id: 1 or "android-27"
Name: Android API 27
Type: Platform
API level: 27
Revision: 3
id: 2 or "android-28"
Name: Android API 28
Type: Platform
API level: 28
Revision: 6
...
:app:generateDebugSources
:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac
/Users/user/workspace/project/mobileapp/platforms/android/app/src/main/java/by/chemerisuk/cordova/firebase/FirebaseConfigPlugin.java:60: error: cannot find symbol
this.firebaseRemoteConfig.activate()
^
symbol: method activate()
location: variable firebaseRemoteConfig of type FirebaseRemoteConfig
/Users/user/workspace/project/mobileapp/platforms/android/app/src/main/java/by/chemerisuk/cordova/firebase/FirebaseConfigPlugin.java:76: error: cannot find symbol
this.firebaseRemoteConfig.fetchAndActivate()
^
symbol: method fetchAndActivate()
location: variable firebaseRemoteConfig of type FirebaseRemoteConfig
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
FAILED
Hi
After installing this plugin with ionic cordova plugin add cordova-plugin-firebase-config --save
I get an error
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_5bkxx3xrq4q6xfo8g2ou2vzcs.run(/Users/.../platforms/android/app/build.gradle:148)
FAILURE: Build failed with an exception.
* Where:
Script '/Users/.../platforms/android/cordova-support-google-services/remix-build.gradle' line: 16
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
> Cannot add extension with name 'googleServices', as there is an extension already registered with that name.
These are the list of plugins I'm currently using (apart from cordova-plugin-firebase-config)
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-plugin-device" spec="^2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.2.1" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.2" />
<plugin name="cordova-sqlite-storage" spec="^2.4.0" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
<plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
<plugin name="cordova-plugin-firebase" spec="2.0.3" />
<plugin name="cordova-plugin-x-socialsharing" spec="5.4.1" />
<plugin name="cordova-wmdatasources" spec="^1.0.142" />
<plugin name="cordova-plugin-local-notification" spec="0.9.0-beta.3" />
<plugin name="cordova-install-referrer" spec="@alpha-health/cordova-android-install-referrer@~0.0.1" />
<engine name="android" spec="7.1.1" />
And this is the output of my ionic info
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.1.1 ([email protected])
local packages:
@ionic/app-scripts : 3.1.9
Cordova Platforms : android 7.1.1
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
Node : v8.11.1
npm : 6.4.1
OS : macOS
Xcode : Xcode 9.1 Build version 9B55
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
This is an Ionic app but I'm using the cordova plugin directly.
i manually edit plugin (java) added
import org.apache.cordova.PluginResult;
I get this error when build/run in Xcode. Any ideas?
/Plugins/cordova-plugin-firebase-remoteconfig/FirebaseRemoteConfigPlugin.h:2:9: Module 'Firebase' not found
Your system information:
Cordova CLI: 7.0.1
Gulp version: CLI version 1.2.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 1.3.2
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
ios-deploy version: 1.9.1
ios-sim version: 5.0.6
OS: Mac OS X Sierra
Node Version: v4.4.0
Xcode version: Xcode 8.3.1 Build version 8E1000a
Hello, I having an issue related to the ionic config.xml in android.
I can not set the XML remote_config_file in configt.xml in order to provide a default local configurations. If I try to set a file when I call the getString from the local resource, It brings null.
How do I set a file to my ionic project, so I can apply default config parameters and read them in my app when it does not have internet connection.
Thank you so much.
Juan
hi, can this plugin be used on devices without google play services? . Currently I am using its version 4.3.0 with sdk firebase 19.1. + And it sends me an error when using fetch ();
Probably from the config object in package.json
Cordova error: Using “requireCordovaModule” to load non-cordova module “q” is not supported in
cordova-play-services-version-adapter
cordova.plugins.firebase.config.fetch(1).then(function() {alert("d");});
Not working
use roles cordova plugins proguard
-keep class by.chemerisuk.cordova.firebase.** {; }
-keep class by.chemerisuk.cordova.firebase.
It looks like some of the other plugins got version bumps and when trying to update them along with this plugin it creates dependency errors on install.
Installing "cordova-plugin-firebase-config" for android
Failed to install 'cordova-plugin-firebase-config': CordovaError: Version of installed plugin: "[email protected]" does not satisfy dependency plugin requirement "cordova-plugin-firebase-analytics@~6.0.0". Try --force to use installed plugin as dependency.
I am getting the below error on integrating this library in my demo app.
<vendor.js:1774 ERROR Error: Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
at FirebaseConfig.getString (vendor.js:76672)
at new HomePage (main.js:172)
at createClass (vendor.js:12808)
at createDirectiveInstance (vendor.js:12651)
at createViewNodes (vendor.js:14109)
at createRootView (vendor.js:13998)
at callWithDebugContext (vendor.js:15423)
at Object.debugCreateRootView [as createRootView] (vendor.js:14706)
at ComponentFactory_.create (vendor.js:11603)
at ComponentFactoryBoundToModule.create (vendor.js:4355)
at c (polyfills.js:3)
at c (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (vendor.js:5076)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at o (polyfills.js:3)
defaultErrorLogger @ vendor.js:1774
Please find the source code below,
`import { FirebaseConfig } from '@ionic-native/firebase-config/ngx';
@component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
constructor(public navCtrl: NavController, private firebaseConfig: FirebaseConfig) {
this.firebaseConfig.getString('key_test', "")
.then((res: any) => console.log(res))
.catch((error: any) => console.error(error));
}
}`
When I use the config together with cordova-plugin-firebase-messaging (in version 8.0.1) it gives an error in IOS_FIREBASE_POD_VERSION, because in the updated cordova-plugin-firebase-messaging it is "10.17.0" and in cordova-plugin-firebase-config "9.3.0", an error occurs when compiling on iOS.
To solve it, just update the IOS_FIREBASE_POD_VERSION to "10.17.0", I did it by variable and it worked
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.