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
document push type and priority keys for notifications (#639)
* document push type and priority keys for notifications
* priority and push type are also part of the data key
* refactor: fix markdown syntax
* add push type and priority key to JS docs
Copy file name to clipboardExpand all lines: _includes/js/push-notifications.md
+5-3
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ This class has several special fields that help you manage and target devices.
26
26
***`channels`**: An array of the channels to which a device is currently subscribed.
27
27
***`timeZone`**: The current time zone where the target device is located. This value is synchronized every time an `Installation` object is saved from the device.
28
28
***`deviceType`**: The type of device, "ios", "android", "winrt", "winphone", or "dotnet"_(readonly)_.
29
-
***`pushType`**: This field is reserved for directing Parse to the push delivery network to be used. If the device is registered to receive pushes via FCM, this field will be marked "gcm". If this device is not using FCM, and is using Parse's push notification service, it will be blank _(readonly)_.
29
+
***`pushType`**: This field is reserved for directing Parse to the push delivery network to be used. If the device is registered to receive pushes via FCM, this field will be marked "gcm". If this device is not using FCM, and is using Parse's push notification service, it will be blank _(readonly)_.
30
30
***`installationId`**: Universally Unique Identifier (UUID) for the device used by Parse. It must be unique across all of an app's installations. _(readonly)_.
31
31
***`deviceToken`**: The Apple or Google generated token used to deliver messages to the APNs or FCM push networks respectively.
32
32
***`channelUris`**: The Microsoft-generated push URIs for Windows devices.
@@ -129,7 +129,7 @@ Parse.Push.send({
129
129
130
130
If we store relationships to other objects in our `Installation` class, we can also use those in our query. For example, we could send a push notification to all users near a given location like this.
@@ -163,7 +163,9 @@ If you want to send more than just a message, you can set other fields in the `d
163
163
***`alert`**: the notification's message.
164
164
***`badge`**: _(iOS only)_ the value indicated in the top right corner of the app icon. This can be set to a value or to `Increment` in order to increment the current value by 1.
165
165
***`sound`**: _(iOS only)_ the name of a sound file in the application bundle.
166
-
***`content-available`**: _(iOS only)_ If you are a writing an app using the Remote Notification Background Mode [introduced in iOS7](https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS7.html#//apple_ref/doc/uid/TP40013162-SW10) (a.k.a. "Background Push"), set this value to 1 to trigger a background download.
166
+
***`content-available`**: _(iOS only)_ If you are a writing an app using the Remote Notification Background Mode [introduced in iOS7](https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS7.html#//apple_ref/doc/uid/TP40013162-SW10) (a.k.a. "Background Push"), set this value to 1 to trigger a background download. You also have to set `push_type` starting iOS 13 and watchOS 6.
167
+
***`push_type`**: _(iOS only)_ The type of the notification. The value is `alert` or `background`. Specify `alert` when the delivery of your notification displays an alert, plays a sound, or badges your app's icon. Specify `background` for silent notifications that do not interact with the user. Defaults to `alert` if no value is set. Required when delivering notifications to devices running iOS 13 and later, or watchOS 6 and later.
168
+
***`priority`**: _(iOS only)_ The priority of the notification. Specify 10 to send the notification immediately. Specify 5 to send the notification based on power considerations on the user’s device. ([More detailed documentation](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns))
167
169
***`category`**: _(iOS only)_ the identifier of the [`UNNotificationCategory`](https://developer.apple.com/reference/usernotifications/unnotificationcategory) for this push notification.
168
170
***`uri`**: _(Android only)_ an optional field that contains a URI. When the notification is opened, an `Activity` associated with opening the URI is launched.
169
171
***`title`**: _(Android only)_ the value displayed in the Android system tray notification.
Copy file name to clipboardExpand all lines: _includes/parse-server/push-notifications.md
+4
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,8 @@ We support most of the sending options. Check the detailed doc [here]({{ site.ba
20
20
21
21
*`channels` to target installations by channels
22
22
*`where` to target installations by `ParseQuery`
23
+
*`priority` under `data` for iOS push priority
24
+
*`push_type` under `data` for iOS push type
23
25
*`alert` under `data` for notification message
24
26
* number `badge` under `data` for iOS badge number
25
27
*`sound` under `data` for iOS sound
@@ -284,6 +286,8 @@ If you're interested in any of these features, [don't hesitate to jump in and se
284
286
285
287
If you are seeing situations where silent notifications are failing to deliver, please ensure that your payload is setting the `content-available` attribute to Int(1) (or just 1 as in javascript) and not "1". This value will be explicitly checked.
286
288
289
+
When sending a push notification to APNs you also have to set `push_type` to `background` for delivering silent notifications to devices running iOS 13 and later, or watchOS 6 or later.
Copy file name to clipboardExpand all lines: _includes/rest/push-notifications.md
+3-1
Original file line number
Diff line number
Diff line change
@@ -620,7 +620,9 @@ If you want to send more than just a message, you can set other fields in the `d
620
620
***`alert`**: the notification's message.
621
621
***`badge`**: _(iOS only)_ the value indicated in the top right corner of the app icon. This can be set to a value or to `Increment` in order to increment the current value by 1.
622
622
***`sound`**: _(iOS only)_ the name of a sound file in the application bundle.
623
-
***`content-available`**: _(iOS only)_ If you are a writing an app using the Remote Notification Background Mode [introduced in iOS7](https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS7.html#//apple_ref/doc/uid/TP40013162-SW10) (a.k.a. "Background Push"), set this value to 1 to trigger a background download.
623
+
***`content-available`**: _(iOS only)_ If you are a writing an app using the Remote Notification Background Mode [introduced in iOS7](https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS7.html#//apple_ref/doc/uid/TP40013162-SW10) (a.k.a. "Background Push"), set this value to 1 to trigger a background download. You also have to set `push_type` starting iOS 13 and watchOS 6.
624
+
***`push_type`**: _(iOS only)_ The type of the notification. The value is `alert` or `background`. Specify `alert` when the delivery of your notification displays an alert, plays a sound, or badges your app's icon. Specify `background` for silent notifications that do not interact with the user. Defaults to `alert` if no value is set. Required when delivering notifications to devices running iOS 13 and later, or watchOS 6 and later.
625
+
***`priority`**: _(iOS only)_ The priority of the notification. Specify 10 to send the notification immediately. Specify 5 to send the notification based on power considerations on the user’s device. ([More detailed documentation](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns))
624
626
***`category`**: _(iOS only)_ the identifier of the [`UNNotificationCategory`](https://developer.apple.com/reference/usernotifications/unnotificationcategory) for this push notification.
625
627
***`uri`**: _(Android only)_ an optional field that contains a URI. When the notification is opened, an `Activity` associated with opening the URI is launched.
626
628
***`title`**: _(Android only)_ the value displayed in the Android system tray notification.
0 commit comments