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

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();