Skip to content

Add support for setting badge count using UNUserNotificationCenter#1531

Merged
VladislavAntonyuk merged 1 commit into
mainfrom
badge-fix-obsolete-api
Nov 16, 2023
Merged

Add support for setting badge count using UNUserNotificationCenter#1531
VladislavAntonyuk merged 1 commit into
mainfrom
badge-fix-obsolete-api

Conversation

@VladislavAntonyuk
Copy link
Copy Markdown
Contributor

…on iOS 17 and above.

  • Added a conditional check to use UNUserNotificationCenter for setting the badge count if the iOS version is at least 17.
  • If the iOS version is below 17, continue to set the badge count using UIApplication.SharedApplication.ApplicationIconBadgeNumber.

This change ensures that the badge count can be set correctly on devices running iOS 17 and above, while maintaining compatibility with older versions of iOS.

Description of Change

Linked Issues

  • Fixes #

PR Checklist

Additional information

…on iOS 17 and above.

- Added a conditional check to use `UNUserNotificationCenter` for setting the badge count if the iOS version is at least 17.
- If the iOS version is below 17, continue to set the badge count using `UIApplication.SharedApplication.ApplicationIconBadgeNumber`.

This change ensures that the badge count can be set correctly on devices running iOS 17 and above, while maintaining compatibility with older versions of iOS.
@VladislavAntonyuk VladislavAntonyuk requested a review from a team November 15, 2023 22:13
@VladislavAntonyuk VladislavAntonyuk self-assigned this Nov 15, 2023
@VladislavAntonyuk VladislavAntonyuk enabled auto-merge (squash) November 16, 2023 14:09
@VladislavAntonyuk VladislavAntonyuk merged commit dfe3022 into main Nov 16, 2023
@VladislavAntonyuk VladislavAntonyuk deleted the badge-fix-obsolete-api branch November 16, 2023 14:09
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants