feat(push-notifications)!: remove deprecated alert presentation option on iOS#2531
Conversation
…list presentation options on iOS
|
@OS-ruimoreiramendes similarly to my comment on the local notifications next PR and what we discussed yesterday, I think the changes that come from |
I can merge main into next directly. For push-notifications I'll still need a separate PR targeting next to remove the alert option on iOS, since that's a breaking change. |
|
Released dev build of push-notifications with dev version: 8.1.1-dev-2531-20260515T160602.0 |
OS-pedrogustavobilro
left a comment
There was a problem hiding this comment.
I'm leaving a comment that doesn't impact this PR, but may involve changes, whenever you can take a look 🙏
| | **`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 - `list`: the push notification is displayed in the notification center 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`** | <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 | |
There was a problem hiding this comment.
Just noticed, slipped me from PR to main, think this readme update for "On Android, defaults to the same behavior as alert" is missing. It's on definitions, but perhaps it was missing a npm run build on the PR to main?
There was a problem hiding this comment.
Already fixed it, seems to be good now.
Description
Removed the deprecated
.alertpresentation option on iOS.BREAKING CHANGE:
alertpresentation option is no longer supported on iOS. Usebannerandlistinstead.Reference: https://outsystemsrd.atlassian.net/browse/RMET-5102
Change Type
Rationale / Problems Fixed
.alertinUNNotificationPresentationOptionswas deprecated in iOS 14 and replaced by the more granular.bannerand.list. Following the backwards-compatible change introduced in the previous PR, this PR removes.alertsupport on iOS entirely.Tests or Reproductions
Tested on a physical iOS device using the Xcode Push Notifications Console with the following
presentationOptionscombinations:["banner", "list", "sound"]: banner appears + sound plays + notification in notification center["banner", "sound"]: banner appears + sound plays["list", "sound"]: no banner + sound plays + notification in notification center["alert", "sound"]: on Android shows notification; on iOS is ignoredPlatforms Affected