@parse/push-adapter 4.1.3 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -18
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -19,8 +19,6 @@ The official Push Notification adapter for Parse Server. See [Parse Server Push
|
|
|
19
19
|
- [Install Push Adapter](#install-push-adapter)
|
|
20
20
|
- [Configure Parse Server](#configure-parse-server)
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
22
|
# Silent Notifications
|
|
25
23
|
|
|
26
24
|
If you have migrated from parse.com and you are seeing situations where silent (newsstand-like presentless) notifications are failing to deliver please ensure that your payload is setting the content-available attribute to Int(1) and not "1" This value will be explicitly checked.
|
|
@@ -44,30 +42,26 @@ This will produce a more verbose output for all the push sending attempts
|
|
|
44
42
|
## Install Push Adapter
|
|
45
43
|
|
|
46
44
|
```
|
|
47
|
-
npm install --save @parse/push-adapter
|
|
45
|
+
npm install --save @parse/push-adapter@<VERSION>
|
|
48
46
|
```
|
|
49
47
|
|
|
50
|
-
Replace VERSION with the version you want to install.
|
|
48
|
+
Replace `<VERSION>` with the version you want to install.
|
|
51
49
|
|
|
52
50
|
## Configure Parse Server
|
|
53
51
|
|
|
54
52
|
```js
|
|
55
53
|
const PushAdapter = require('@parse/push-adapter').default;
|
|
56
|
-
const
|
|
57
|
-
ios: { /* iOS push options */ } ,
|
|
58
|
-
android: { /* android push options */ }
|
|
59
|
-
}
|
|
60
|
-
// starting 3.0.0
|
|
61
|
-
const options = {
|
|
62
|
-
appId: "****",
|
|
63
|
-
masterKey: "****",
|
|
54
|
+
const parseServerOptions = {
|
|
64
55
|
push: {
|
|
65
|
-
adapter: new PushAdapter(
|
|
56
|
+
adapter: new PushAdapter({
|
|
57
|
+
ios: {
|
|
58
|
+
/* Apple push notification options */
|
|
59
|
+
},
|
|
60
|
+
android: {
|
|
61
|
+
/* Android push options */
|
|
62
|
+
}
|
|
63
|
+
})
|
|
66
64
|
},
|
|
67
|
-
/*
|
|
65
|
+
/* Other Parse Server options */
|
|
68
66
|
}
|
|
69
|
-
|
|
70
|
-
const server = new ParseServer(options);
|
|
71
|
-
|
|
72
|
-
/* continue with the initialization of parse-server */
|
|
73
67
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parse/push-adapter",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "Base parse-server-push-adapter",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"semantic-release": "17.4.6"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@parse/node-apn": "5.
|
|
43
|
+
"@parse/node-apn": "5.2.3",
|
|
44
44
|
"@parse/node-gcm": "1.0.2",
|
|
45
45
|
"npmlog": "4.1.2",
|
|
46
46
|
"parse": "3.4.0"
|