Skip to content

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

Merged
OS-ruimoreiramendes merged 1 commit into
mainfrom
feat/RMET-5103/deprecate-alert
May 15, 2026
Merged

feat(local-notifications): add presentationOptions config support for iOS#2530
OS-ruimoreiramendes merged 1 commit into
mainfrom
feat/RMET-5103/deprecate-alert

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

Copy link
Copy Markdown
Contributor

@OS-pedrogustavobilro OS-pedrogustavobilro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tested the new options with capacitor-testapp, they're working well!

@OS-ruimoreiramendes OS-ruimoreiramendes merged commit 78bea4c into main May 15, 2026
10 checks passed
@OS-ruimoreiramendes OS-ruimoreiramendes deleted the feat/RMET-5103/deprecate-alert branch May 15, 2026 10:50
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