Highlights
- Added throwing async APIs for scheduling notifications and updating badge counts.
- Added
NotificationManagerErrorwith validation for:- Invalid time intervals
- Repeating intervals shorter than 60 seconds
- Trigger dates that are not in the future
- Added APIs for fetching and removing delivered notifications.
- Added support for custom authorization options.
- Notification replacement now updates requests atomically.
- Existing synchronous scheduling and badge APIs remain available as fire-and-forget wrappers.
New APIs
requestAuthorizationThrowing()getDeliveredNotifications()getDeliveredNotificationIDs()removeDeliveredNotifications(ids:)- Throwing async variants of scheduling, repeating, badge, and reset operations
Renamed APIs
The previous names remain available as deprecated compatibility wrappers:
requestAuthorizationThrowable()→requestAuthorizationThrowing()getPendingNotificationRequestsIds()→getPendingNotificationRequestIDs()
Authorization Behavior
Default authorization requests now include only alert, sound, and badge permissions. Additional options such as
provisional authorization can be requested explicitly using requestAuthorization(for:).
Documentation and Maintenance
- Expanded the README with examples for authorization, scheduling, error handling, delivered notifications, and badge
management. - Added comprehensive unit tests through an injectable notification center.
- Improved CI configuration and added contribution, security, issue, and pull-request templates.
Full Changelog: v1.1.1...v1.2.0