You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+96-9Lines changed: 96 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
12
12
---
13
13
14
-
The official Push Notification adapter for Parse Server. See [Parse Server Push Configuration](http://docs.parseplatform.org/parse-server/guide/#push-notifications) for more details.
14
+
The official Push Notification adapter for Parse Server. See [Parse Server Push Configuration](http://docs.parseplatform.org/parse-server/guide/#push-notifications) for more details.
15
15
16
16
---
17
17
@@ -20,6 +20,9 @@ The official Push Notification adapter for Parse Server. See [Parse Server Push
20
20
-[Using a Custom Version on Parse Server](#using-a-custom-version-on-parse-server)
-[Migration from FCM legacy API to FCM HTTP v1 API (June 2024)](#migration-from-fcm-legacy-api-to-fcm-http-v1-api-june-2024)
23
26
-[Expo Push Options](#expo-push-options)
24
27
25
28
# Silent Notifications
@@ -33,7 +36,7 @@ You can enable verbose logging with environment variables:
33
36
```
34
37
VERBOSE=1
35
38
36
-
or
39
+
or
37
40
38
41
VERBOSE_PARSE_SERVER_PUSH_ADAPTER=1
39
42
```
@@ -44,7 +47,7 @@ This will produce a more verbose output for all the push sending attempts
44
47
45
48
## Install Push Adapter
46
49
47
-
```
50
+
```bash
48
51
npm install --save @parse/push-adapter@<VERSION>
49
52
```
50
53
@@ -58,20 +61,105 @@ const parseServerOptions = {
58
61
push: {
59
62
adapter:newPushAdapter({
60
63
ios: {
61
-
/* Apple push options*/
64
+
// Apple push options
62
65
},
63
66
android: {
64
-
/* Android push options*/
67
+
// Android push options
65
68
},
66
69
web: {
67
-
/* Web push options*/
70
+
// Web push options
68
71
},
69
72
expo: {
70
-
/* Expo push options */
73
+
// Expo push options
74
+
},
75
+
}),
76
+
},
77
+
// Other Parse Server options
78
+
}
79
+
```
80
+
81
+
### Apple Push Options
82
+
83
+
Parse Server Push Adapter currently supports these types of Apple ecosystems:
84
+
85
+
-`ios`: iPhone, iPad, and iPod touch apps
86
+
-`osx`: macOS, and macCatalyst apps
87
+
-`tvos`: tvOS apps
88
+
89
+
Delivering push notifications to Apple devices can be done either via Apple Push Notification Service (APNS), or via Firebase Cloud Messaging (FMC). Note that each category of Apple devices require their own configuration section:
90
+
91
+
- APNS requires a private key that can be downloaded from the Apple Developer Center at https://developer.apple.com/account under _Certificates > Identifiers & Profiles._ The adapter options also require the app ID and team ID which can be found there.
92
+
- FCM requires a private key that can be downloaded from the Firebase Console at https://console.firebase.google.com in your project under _Settings > Cloud Messaging._
93
+
94
+
Example options:
95
+
96
+
Both services (APNS, FCM) can be used in combination for different Apple ecosystems.
// Deliver push notifications to iOS devices via APNS
105
+
token: {
106
+
key:__dirname+'/apns.p8',
107
+
keyId:'<APNS_KEY_ID>',
108
+
teamId:'<APNS_TEAM_ID>',
109
+
},
110
+
topic:'<BUNDLE_IDENTIFIER>',
111
+
production:true
112
+
},
113
+
osx: {
114
+
// Deliver push notifications to macOS devices via FCM
115
+
firebaseServiceAccount:__dirname+'/firebase.json'
116
+
},
117
+
}),
118
+
},
119
+
// Other Parse Server options
120
+
}
121
+
```
122
+
123
+
### Android Push Options
124
+
125
+
Delivering push notifications to Android devices can be done via Firebase Cloud Messaging (FCM):
126
+
127
+
- FCM requires a private key that can be downloaded from the Firebase Console at https://console.firebase.google.com in your project under _Settings > Cloud Messaging._
#### Migration from FCM legacy API to FCM HTTP v1 API (June 2024)
146
+
147
+
Sending push notifications to Android devices via the FCM legacy API was deprecated on June 20 2023 and was announced to be decomissioned in June 2024. See [Google docs](https://firebase.google.com/docs/cloud-messaging/migrate-v1). To send push notifications to the newer FCM HTTP v1 API you need to update your existing push configuration for Android by replacing the key `apiKey` with `firebaseServiceAccount`.
0 commit comments