Skip to content

Pushwoosh/pushwoosh-react-native-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

pushwooshpushwoosh
pushwoosh
and
pushwoosh
Feb 10, 2025
ef5fcdb · Feb 10, 2025
Feb 10, 2025
Feb 18, 2021
Feb 10, 2025
Apr 3, 2019
Feb 5, 2025
Feb 18, 2019
Jan 20, 2020
Jun 6, 2016
Apr 22, 2022
Feb 26, 2024
Feb 12, 2024
Feb 10, 2025
Feb 10, 2025
Nov 7, 2023

Repository files navigation

React Native Pushwoosh Push Notifications module

GitHub release npm license

platforms

Guide Documentation Sample

Installation

npm install pushwoosh-react-native-plugin --save
react-native link pushwoosh-react-native-plugin

For Android platform, also add the following lines to your project's build.gradle:

//you should already have buildscript and dependencies blocks in your project's build.gradle so just put the classpath line there
buildscript {
 dependencies {
 classpath 'com.google.gms:google-services:4.3.3'
 }
}

//add these lines to the very end of your build.gradle
apply {
 plugin com.google.gms.googleservices.GoogleServicesPlugin
}

Usage

import Pushwoosh from 'pushwoosh-react-native-plugin';

Pushwoosh.init({ 
    "pw_appid" : "YOUR_PUSHWOOSH_PROJECT_ID" , 
    "project_number" : "YOUR_GCM_PROJECT_NUMBER" 
});
Pushwoosh.register();

In order to use custom notification handling on iOS specify the parameter "pw_notification_handling" to "CUSTOM" when initializing the plugin(If no value specified Pushwoosh notification handler is used):

import Pushwoosh from 'pushwoosh-react-native-plugin';

Pushwoosh.init({ 
    "pw_appid" : "YOUR_PUSHWOOSH_PROJECT_ID" , 
    "project_number" : "YOUR_GCM_PROJECT_NUMBER",
    "pw_notification_handling" : "CUSTOM"
});
Pushwoosh.register();

In order to use reverse proxy to connect to pushwoosh servers specify the parameter "reverse_proxy_url" with the url to your reverse proxy when initializing the plugin:

import Pushwoosh from 'pushwoosh-react-native-plugin';

Pushwoosh.init({ 
    "pw_appid" : "YOUR_PUSHWOOSH_PROJECT_ID" , 
    "project_number" : "YOUR_GCM_PROJECT_NUMBER",
    "reverse_proxy_url" : "URL_TO_YOUR_REVERSE_PROXY"
});
Pushwoosh.register();