docs(ios): Support iOS 12 Critical Alerts (#368)

This commit is contained in:
Bo-Yi Wu 2018-08-28 11:14:02 +08:00 committed by GitHub
parent 0c89fd1d81
commit b5603fa8c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 29 additions and 2 deletions

View File

@ -469,7 +469,7 @@ Request body must has a notifications array. The following is a parameter table
| title | string | notification title | - | | | title | string | notification title | - | |
| priority | string | Sets the priority of the message. | - | `normal` or `high` | | priority | string | Sets the priority of the message. | - | `normal` or `high` |
| content_available | bool | data messages wake the app by default. | - | | | content_available | bool | data messages wake the app by default. | - | |
| sound | string | sound type | - | | | sound | interface{} | sound type | - | |
| data | string array | extensible partition | - | | | data | string array | extensible partition | - | |
| retry | int | retry send notification if fail response from server. Value must be small than `max_retry` field. | - | | | retry | int | retry send notification if fail response from server. Value must be small than `max_retry` field. | - | |
| topic | string | send messages to topics | | | | topic | string | send messages to topics | | |
@ -487,6 +487,9 @@ Request body must has a notifications array. The following is a parameter table
| category | string | the UIMutableUserNotificationCategory object | - | only iOS | | category | string | the UIMutableUserNotificationCategory object | - | only iOS |
| alert | string array | payload of a iOS message | - | only iOS. See the [detail](#ios-alert-payload) | | alert | string array | payload of a iOS message | - | only iOS. See the [detail](#ios-alert-payload) |
| mutable_content | bool | enable Notification Service app extension. | - | only iOS(10.0+). | | mutable_content | bool | enable Notification Service app extension. | - | only iOS(10.0+). |
| name | string | sets the name value on the aps sound dictionary. | - | only iOS |
| volume | float32 | sets the volume value on the aps sound dictionary. | - | only iOS |
### iOS alert payload ### iOS alert payload
| name | type | description | required | note | | name | type | description | required | note |
@ -504,6 +507,26 @@ Request body must has a notifications array. The following is a parameter table
See more detail about [APNs Remote Notification Payload](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html). See more detail about [APNs Remote Notification Payload](https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html).
### iOS sound payload
| name | type | description | required | note |
|----------------|------------------|--------------------------------------------------------------------------------------------------|----------|------|
| name | string | sets the name value on the aps sound dictionary. | - | |
| volume | float32 | sets the volume value on the aps sound dictionary. | - | |
| critical | int | sets the critical value on the aps sound dictionary. | - | |
request format:
```json
{
"sound": {
"critical": 1,
"name": "default",
"volume": volume
}
}
```
### Android notification payload ### Android notification payload
| name | type | description | required | note | | name | type | description | required | note |
@ -564,7 +587,11 @@ The following payload specifies that the device should display an alert message,
"platform": 1, "platform": 1,
"message": "You got your emails.", "message": "You got your emails.",
"badge": 9, "badge": 9,
"sound": "bingbong.aiff" "sound": {
"critical": 1,
"name": "default",
"volume": 1.0
}
} }
] ]
} }