1.2.15 • Published 1 year ago
push-notifications-coinstats v1.2.15
CoinStats Push-notifications
an universal library used to send push notifications to ios,android and web.
Install
npm install push-notifications-coinstats
Usage
Create a push
folder in the root of your project:
- Add
production.p12
certificate( you can add alsodevelopment.p12
certificate if you want to senddev
push notifications) - Add
iosConfig.json
in this form
{
"production": {
"appName": "Coin Stats",
"push": {
"ios": [
{
"pfx": "",
"bundleId": "some boundle id",
"production": true,
"passphrase": "passphrase"
}
]
},
"logLevel": "warn"
},
"development": {
"appName": "Coin Stats",
"push": {
"ios": [
{
"pfx": "",
"bundleId": "bundleId",
"production": false,
"passphrase": "passphrase"
}
]
},
"logLevel": "warn"
}
}
- Import in existing project
const {PushNotification} = require('push-notifications-coinstats')
const pushService = new PushNotification(
process.env.PUSH_ANDROID_API_KEY, // Android key
{ // Ios Config
production: require('./iosConfig.json').production,
development: require('./iosConfig.json').development,
dirname: __dirname
},
process.env.PUSH_ONESIGNAL_ID) // One signal
- Use
pushService
to send push notifications
pushService.sendPushToAndroidDevices(data, tokens);
Note: use options
to add optional data to your push notification.
1.2.8
1 year ago
1.2.7
1 year ago
1.2.9
1 year ago
1.2.12
1 year ago
1.2.13
1 year ago
1.2.10
1 year ago
1.2.11
1 year ago
1.2.15
1 year ago
1.2.6
2 years ago
1.2.0
2 years ago
1.1.9
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.2.5
2 years ago
1.1.6
2 years ago
1.2.4
2 years ago
1.2.3
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.1.10
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago