Is it necessary to do manual installation for react-native-push-notification as mentioned in library npm page. I did it but its not working. Can some share the latest example for the same.
Is there any alternative to react-native-push-notification.
You can user react-native-firebase npm package, it is a well documented library for push notifications and cloud messaging.
Related
I have existing react-native project and I want to use expo-in-app-purchases module, and can't find clear doc how to do that. unimodules from its README are deprecated, and not sure that migration is the right one.
I want only one module, without migrating to expo.
In order to use 'expo-in-app-purchases' you have to install Expo modules, as stated in docs:
You must ensure that you have installed and configured Expo modules before continuing.
It doesn't mean that you have to migrate the whole project to expo. There are two scenarios:
You don't have Expo modules in your project: use automatic installation,
You have react-native-unimodules installed: migrate to Expo modules using this guide
I want to use native-base but i do not want to install react-native link. How can i do this?
The reason i do not want to install react-native link is because react-native doc suggest us to delete react-native CLI globally.
I guess you have misunderstanding of what react-native link does. react-native link is an automatic way for installing native dependencies. read more here
In case of Native Base. This library is consist of other npm packages, so you need to install them in order to work properly with Native Base.
Native Base Docs states
Install Peer Dependencies
The peer dependencies included from any npm packages does not automatically get installed. Your application will not depend on it explicitly. read more here
If your react-native version is 0.60+ you do not need to link dependencies. All you need to do is install dependencies and you are good to do.
i'm trying to use 'react-native-video' in my application, i have used the following lines to get it:
npm install --save react-native-video
react-native link react-native-video (since my react native version is 0.59)
after doing so and using "Video" component from 'react-native-vide' i got an error like below:
what is the problem? what can i do? any ideas?
You did not link the library properly.
After having installed the library through npm i --save react-native-video, you'll need to run react-native link react-native-video in order to link it. This may or may not work - if it does not, you'll need to link manually according to the installation instructions of the library.
You might be using CocoaPods in which case you'll need to run these commands as well: cd ios && pod install
If you receive an error, you're most likely not using CocoaPods and this is the wrong approach.
Please note that you'll need to reinstall the app on the phone / simulator afterwards since you've changed the native dependencies. You'll also need to do this if you're using (ejected) Expo or anything alike. If you're using Expo with the managed workflow (= not ejected) you're not able to use libraries that depend on native linking.
I need to use the methods of an eternal API in my native project.
If this were react I would just do
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"</script>
for example, I don't need bootstrap specifically.
Is there a way to do this in react-native?
You can use npm to manage your dependencies. Your react-native project should already be configured for this. You can install dependencies like this npm install --save my-react-native-module. Sometimes you will have to link them like this react-native link my-react-native-module. Most of those dependencies will write on their read me page how to install them.
I am working on a react-native app and I am required to integrate FCM push notification service, so how can I integrate it?
Use this module
https://github.com/evollu/react-native-fcm
Install
npm i -S react-native-fcm
Link the library to your iOS/Android project
react-native link react-native-fcm
Check the configuration and usage details in the README
I came across the same issue and I find out there were 2 ways
react-native-fcm: Simple and Easy to use.
Create my own module! why reinvent the wheel right? but react-native-fcm has 79+ open issues and hasn't been updated since past 1-month while Firebase is changing very rapidly.
So decide to create my own module and handle it my own way.If you are planning to make your own module then I have shared my code on this Git Repo: https://github.com/hiteshsahu/react-native-fcm-android.
Hope it helps.