react-notification-library
v1.0.4
Published
Handle all the notifications for your app, including remote and local notifications, interactive notifications, silent notifications, and more.
Downloads
4
Readme
react-native-notification-library
Getting started
$ npm install react-notification-library --save
Mostly automatic installation
$ react-native link react-notification-library
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-notification-library
and addRNNotificationLibrary.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNNotificationLibrary.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.rn.notification.library.RNNotificationLibraryPackage;
to the imports at the top of the file - Add
new RNNotificationLibraryPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-notification-library' project(':react-notification-library').projectDir = new File(rootProject.projectDir, '../node_modules/react-notification-library/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-notification-library')
Usage
import RNNotificationLibrary from 'react-notification-library';
// TODO: What to do with the module?
RNNotificationLibrary;