$ npm install io.noim-notification-listener --save
$ react-native link io.noim-notification-listener
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜io.noim-notification-listener
and addNOIMNotificationListener.xcodeproj
- In XCode, in the project navigator, select your project. Add
libNOIMNotificationListener.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import io.noim.notificationlistener.NOIMNotificationListenerPackage;
to the imports at the top of the file - Add
new NOIMNotificationListenerPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':io.noim-notification-listener' project(':io.noim-notification-listener').projectDir = new File(rootProject.projectDir, '../node_modules/io.noim-notification-listener/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':io.noim-notification-listener')
- In Visual Studio add the
NOIMNotificationListener.sln
innode_modules/io.noim-notification-listener/windows/NOIMNotificationListener.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Com.Reactlibrary.NOIMNotificationListener;
to the usings at the top of the file - Add
new NOIMNotificationListenerPackage()
to theList<IReactPackage>
returned by thePackages
method
import NOIMNotificationListener from 'io.noim-notification-listener';
// TODO: What to do with the module?
NOIMNotificationListener;