diff --git a/push-notifications/README.md b/push-notifications/README.md index 41adf33e7..9ab5bc5f7 100644 --- a/push-notifications/README.md +++ b/push-notifications/README.md @@ -87,9 +87,9 @@ From Android 8.0 (API level 26) and higher, notification channels are supported You can configure the way the push notifications are displayed when the app is in foreground. -| Prop | Type | Description | Since | -| ------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **`presentationOptions`** | PresentationOption[] | 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 | +| Prop | Type | Description | Since | +| ------------------------- | --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | +| **`presentationOptions`** | PresentationOption[] | 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 | ### Examples diff --git a/push-notifications/ios/Sources/PushNotificationsPlugin/PushNotificationsHandler.swift b/push-notifications/ios/Sources/PushNotificationsPlugin/PushNotificationsHandler.swift index 653d4eb5d..d6a55a68f 100644 --- a/push-notifications/ios/Sources/PushNotificationsPlugin/PushNotificationsHandler.swift +++ b/push-notifications/ios/Sources/PushNotificationsPlugin/PushNotificationsHandler.swift @@ -38,9 +38,6 @@ public class PushNotificationsHandler: NSObject, NotificationHandlerProtocol { presentationOptions.insert(.banner) case "list": presentationOptions.insert(.list) - case "alert": - presentationOptions.insert(.banner) - presentationOptions.insert(.list) case "badge": presentationOptions.insert(.badge) case "sound": diff --git a/push-notifications/src/definitions.ts b/push-notifications/src/definitions.ts index b457933ef..7216d49cf 100644 --- a/push-notifications/src/definitions.ts +++ b/push-notifications/src/definitions.ts @@ -14,7 +14,7 @@ declare module '@capacitor/cli' { * 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. + * - `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`. *