Skip to content

Commit 9c95fe2

Browse files
feat(push-notifications)!: remove deprecated alert presentation option on iOS (#2531)
1 parent 462485e commit 9c95fe2

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

push-notifications/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ From Android 8.0 (API level 26) and higher, notification channels are supported
8787

8888
You can configure the way the push notifications are displayed when the app is in foreground.
8989

90-
| Prop | Type | Description | Since |
91-
| ------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
92-
| **`presentationOptions`** | <code>PresentationOption[]</code> | This is an array of strings you can combine. Possible values in the array are: - `badge`: badge count on the app icon is updated (default value) - `sound`: the device will ring/vibrate when the push notification is received - `alert`: **Deprecated on iOS.** Use `banner` and `list` instead. On Android, this value is still used to display the notification. - `banner`: the push notification is displayed as a banner. On Android, defaults to the same behavior as `alert`. - `list`: the push notification is displayed in the notification center. On Android, defaults to the same behavior as `alert`. An empty array can be provided if none of the options are desired. badge is only available for iOS. | 1.0.0 |
90+
| Prop | Type | Description | Since |
91+
| ------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
92+
| **`presentationOptions`** | <code>PresentationOption[]</code> | This is an array of strings you can combine. Possible values in the array are: - `badge`: badge count on the app icon is updated (default value) - `sound`: the device will ring/vibrate when the push notification is received - `alert`: the push notification is displayed in a native dialog. Only available on Android. - `banner`: the push notification is displayed as a banner. On Android, defaults to the same behavior as `alert`. - `list`: the push notification is displayed in the notification center. On Android, defaults to the same behavior as `alert`. An empty array can be provided if none of the options are desired. badge is only available for iOS. | 1.0.0 |
9393

9494
### Examples
9595

push-notifications/ios/Sources/PushNotificationsPlugin/PushNotificationsHandler.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ public class PushNotificationsHandler: NSObject, NotificationHandlerProtocol {
3838
presentationOptions.insert(.banner)
3939
case "list":
4040
presentationOptions.insert(.list)
41-
case "alert":
42-
presentationOptions.insert(.banner)
43-
presentationOptions.insert(.list)
4441
case "badge":
4542
presentationOptions.insert(.badge)
4643
case "sound":

push-notifications/src/definitions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ declare module '@capacitor/cli' {
1414
* This is an array of strings you can combine. Possible values in the array are:
1515
* - `badge`: badge count on the app icon is updated (default value)
1616
* - `sound`: the device will ring/vibrate when the push notification is received
17-
* - `alert`: **Deprecated on iOS.** Use `banner` and `list` instead. On Android, this value is still used to display the notification.
17+
* - `alert`: the push notification is displayed in a native dialog. Only available on Android.
1818
* - `banner`: the push notification is displayed as a banner. On Android, defaults to the same behavior as `alert`.
1919
* - `list`: the push notification is displayed in the notification center. On Android, defaults to the same behavior as `alert`.
2020
*

0 commit comments

Comments
 (0)