Skip to content

feat(local-notifications): add presentationOptions config support for iOS#2532

Closed
OS-ruimoreiramendes wants to merge 1 commit into
nextfrom
feat/RMET-5103/deprecate-alert-next
Closed

feat(local-notifications): add presentationOptions config support for iOS#2532
OS-ruimoreiramendes wants to merge 1 commit into
nextfrom
feat/RMET-5103/deprecate-alert-next

Conversation

@OS-ruimoreiramendes
Copy link
Copy Markdown
Contributor

Description

Added presentationOptions config support to local-notifications on iOS, replacing the hardcoded [.badge, .sound, .alert] in willPresent. The deprecated .alert is not exposed, only .badge, .sound, .banner and .list are available.
Default behaviour (when no config is provided) is [.badge, .sound, .banner, .list], equivalent to the previous behaviour.

Reference: https://outsystemsrd.atlassian.net/browse/RMET-5103

Change Type

  • Fix
  • Feature
  • Refactor
  • Breaking Change
  • Documentation

Rationale / Problems Fixed

.alert in UNNotificationPresentationOptions is deprecated since iOS 14. Since presentationOptions is being introduced from scratch in local-notifications, only the non deprecated values are exposed (badge, sound, banner and list), skipping alert entirely.

Tests or Reproductions

Tested on a physical iOS device with the following presentationOptions combinations:

  • ["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
  • not set: default behaviour (badge + sound + banner + list)

Platforms Affected

  • Android
  • iOS
  • Web

@OS-pedrogustavobilro
Copy link
Copy Markdown
Contributor

@OS-ruimoreiramendes for this one shouldn't you merge main to next instead? Because it's the exact same PR as the main one no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants