Skip to content

ErsanQ/NotificationKit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NotificationKit

A simple, modern, and async-await first library for managing local notifications in SwiftUI.

NotificationKit Demo

Features

  • Zero Boilerplate: Send notifications with a single line of code.
  • Async/Await: Built-in support for the latest Swift concurrency.
  • Auto-Permissions: Automatically requests user permission when scheduling.
  • Flexible Scheduling: Schedule after a delay or at a specific date.
  • Identifier Support: Easily track and cancel individual notifications.

Supported Platforms

  • iOS 14.0+
  • macOS 11.0+

Installation

.package(url: "https://github.com/ErsanQ/NotificationKit", from: "1.0.0")

Usage

Simple Delay

import NotificationKit

await NotificationKit.shared.send("Hello!", body: "This is a quick notification after 5 seconds", after: 5)

Schedule at Date

let tomorrowAtMorning = Calendar.current.date(bySettingHour: 9, minute: 0, second: 0, of: Date())!

await NotificationKit.shared.schedule("Morning Routine", body: "Time to start your day!", at: tomorrowAtMorning)

Cancel Notifications

NotificationKit.shared.cancelAll()
NotificationKit.shared.cancel(ids: ["user_id_123"])

License

MIT License.

Author

ErsanQ (Swift Package Index Community)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages