React Native FIrebase with Wix React Native Navigation - react-native-firebase

Has anyone got these 2 working together?
I added react native firebase to my app and it crashes on start up.
I then tested the starter kit provided by react native firebase and once I install react native navigation the app crashes.
Using React Native 0.51, React native navigation v1.1.365 and react native firebase 3.2.2
Thanks

Yeah.
It's Possible.
What I did Was first Installed Firebase and configured.
Then I Installed Wix/react-native Navigation. Follow the steps mentioned in the Official Documentation.
Link for the same to Install and configure is https://wix.github.io/react-native-navigation/#/installation-android.
a command to install library is
"sudo npm install --save react-native-navigation#latest".
Note: App crashes due to MainActivity File. Please remove unwanted code snippet. It should have following code snippet only. As shown Below.
In MainActivity.java it should extend
com.reactnativenavigation.controllers.SplashActivity instead of ReactActivity.
This file can be located in android/app/src/main/java/com/yourproject/.
import com.reactnativenavigation.controllers.SplashActivity;
public class MainActivity extends SplashActivity {
}

Managed to get up and running fully with React Native FCM. Seems to be the best option if using react native navigation.

Related

React Native Firebase Dynamic Links

I am using react native firebase dynamic links, after completing my setup, i tried to use it, but i faced this error .
APP ERR Error: You attempted to use a firebase module that's not installed natively on your iOS project by calling firebase.dynamicLinks().
Ensure you have either linked the module or added it to your projects Podfile.
I tried pod install but still have the error

Error while implementing firebase in expo snack (react native)

image
I encounterd this error while importing firebase to my expo snack which is use for authentication in my app project. Can anyone help me?
The problem is with babel:
Try this first: npm add #babel/runtime
And if that doesn't work try to do this:
as was mentioned above, looks like the presence of this property
watchFolders: [${__dirname}/../..],
in metro.config.js solves the problem. I have a monorepo and mobile app is one of packages, that is why I need ../..
BTW in my case, interopRequireDefault problem appears only when I make a release build with
react-native run-android --variant release
developing mode ( react-native run-android ) works fine even without metro.config.js file
Also, there is no problem if a project is not configured as Monorepo
Reference: https://github.com/facebook/react-native/issues/27712

Emulator is showing error {firebase.App() not found} while using firebase authentication with React Native using expo-cli

While using functionality of authentication through firebase, emulator is showing error i.e.{ you attempted to use a firebase module that is not installed on your android project by calling firebase.app() }.Please help me to resolve this error.
I'm using Expo as command line input.
react-native version -0.63.6,
"#react-native-firebase/app": "^8.4.3",
"#react-native-firebase/auth": "^9.2.3"
If you are using expo client, you should not use react-native-firebase modules because they are not compatible with expo client.
However, you can use firebase javascript SDK instead. It is all explained there.
Update 02-12-2021
Guys expo's eas-build is now public. You can add custom native codes and use react-native-firebase. Here is the link to a youtube tutorial. The video is short and super easy to follow. Here is the link to the docs
Previous answer
Currently, Firebase does not work in react native if you are using the mobile configuration. However, if you use the web configuration it will work. Here is the youtube tutorial. Watch from 38:20 to set up.

cordova-plugin-fcm-with-dependecy-updated not working ionic 5

I installed cordova-plugin-fcm-with-dependecy-updated by following the ionic documentation and made all the necessary firebase configurations.
I imported FCM into app modules.
Then I put the notification code in my app.component.ts
But when I do ionic cordova run android I have this as information:
the problem is that it does not display the token, please someone could help me.
for me the solution was:
ionic cordova plugin remove cordova-plugin-fcm-with-dependecy-updated
ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated#7.2.0
import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
ionic cordova run android
I had the same issue. I solved it by importing { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic';
more details here
I had the same issue, Try to import FCM with this:
import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
I had the same problem. Instead of importing FCM from the npm package, import it like this directly from the cordova package:
import { FCM } from "cordova-plugin-fcm-with-dependecy-updated/ionic/ngx";
Try this:
Copy your project to a new folder / repo, and re-install
npm install
Add the platform
ionic cordova platfrom add ios
Clear cache
npm cache clean
install the following plugin first
cordova plugin add cordova-plugin-androidx
cordova plugin add cordova-plugin-androidx-adapter
now
import fcm as import { FCM } from "cordova-plugin-fcm-with-dependecy-updated/ionic/ngx";
remove platforms and add them again then build the project again
I had the same problem, I followed the below steps and it worked.
1-delete the node_modules folder.
2-run npm i.
my issue was due to incomplete or maybe corrupt installation of the package.
I solved my problem using onesignal

Can't run Realm with React not native

Created my react app with react-create-app. Installed realm and included it. Get the following error:
Module not found: Can't resolve 'react-native' in
./node_modules/realm/lib/browser/index.js'
It's true that the file requires react-native but my application isn't React Native, it's just React. Installing react-native module anyway does not solve this.
I've tried to use include Realm in a simple javascript file and run it with Node (No React included). It worked. What could cause this to fail in my project? The start script I am using?

Resources