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: _includes/parse-server/push-notifications.md
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
# Push Notifications
2
2
3
-
Parse Server provides basic push notification functionality for iOS, macOS, tvOS and Android. With this feature, you can:
3
+
Parse Server provides basic push notification functionality for iOS, macOS, tvOS, watchOS<sup>*</sup>, and Android. With this feature, you can:
4
4
5
5
* Target installations by platform
6
6
* Target installations by a `ParseQuery`
7
7
* Send push notifications to Android devices through [Firebase Cloud Messaging (FCM)](https://firebase.google.com/docs/cloud-messaging/)
8
-
* Send push notifications to iOS, tvOS and macOS devices through [Apple Push Notification Service (APNS)](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html#//apple_ref/doc/uid/TP40008194-CH8-SW1)
8
+
* Send push notifications to iOS, tvOS, watchOS, and macOS devices through [Apple Push Notification Service (APNS)](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html#//apple_ref/doc/uid/TP40008194-CH8-SW1)
9
9
* Use most of the sending options
10
10
11
11
However, there are a few caveats:
@@ -15,6 +15,8 @@ However, there are a few caveats:
15
15
* Delivery reports are not supported
16
16
* Scheduled push is not supported
17
17
18
+
<sup>*</sup>Sending notifications to watchOS devices requires [parse-server-push-adapter](https://github.com/parse-community/parse-server-push-adapter) >= 6.10.0.
19
+
18
20
## API
19
21
We support most of the sending options. Check the detailed doc [here]({{ site.baseUrl }}/rest/guide/#sending-options). Parse Server supports the following:
20
22
@@ -44,7 +46,7 @@ You will need to obtain some credentials from FCM and APNS in order to send push
44
46
45
47
#### APNS (iOS)
46
48
47
-
If you are setting up push notifications on iOS, tvOS or macOS for the first time, we recommend you visit the [raywenderlich.com's Push Notifications tutorial](https://www.raywenderlich.com/11395893-push-notifications-tutorial-getting-started) or [appcoda.com's iOS Push tutorial](https://www.appcoda.com/push-notification-ios/) to help you obtain a production Apple Push Certificate. Parse Server supports the PFX (`.p12`) file exported from Keychain Access. Parse Server also supports the push certificate and key in `.pem` format. Token-based authentication instead of a certificate is supported as well.
49
+
If you are setting up push notifications on iOS, tvOS, watchOS, or macOS for the first time, we recommend you visit the [raywenderlich.com's Push Notifications tutorial](https://www.raywenderlich.com/11395893-push-notifications-tutorial-getting-started) or [appcoda.com's iOS Push tutorial](https://www.appcoda.com/push-notification-ios/) to help you obtain a production Apple Push Certificate. Parse Server supports the PFX (`.p12`) file exported from Keychain Access. Parse Server also supports the push certificate and key in `.pem` format. Token-based authentication instead of a certificate is supported as well.
48
50
49
51
#### FCM (Android)
50
52
@@ -127,13 +129,16 @@ push: {
127
129
tvos: [
128
130
// ...
129
131
],
132
+
watchos: [
133
+
// ...
134
+
],
130
135
osx: [
131
136
// ...
132
137
]
133
138
}
134
139
```
135
140
136
-
The configuration for macOSand tvOS works exactly as for iOS. Just add an additional configuration for each platform under the appropriate key. Please note the key for macOS is `osx` and for tvOS is `tvos`. If you need to support both the dev and prod certificates, you can do that for all Apple platforms like described above.
141
+
The configuration for macOS, tvOS, and watchOS works exactly as for iOS. Just add an additional configuration for each platform under the appropriate key. Please note the key for macOS is `osx`, the key for tvOS is `tvos`, and the key for watchOS is `watchos`. If you need to support both the dev and prod certificates, you can do that for all Apple platforms like described above.
137
142
138
143
```js
139
144
var server =newParseServer({
@@ -162,6 +167,12 @@ var server = new ParseServer({
162
167
passphrase:'', // optional password to your p12/PFX
163
168
bundleId:'',
164
169
production:false
170
+
},
171
+
watchos: {
172
+
pfx:'/file/path/to/XXX.p12',
173
+
passphrase:'', // optional password to your p12/PFX
0 commit comments