Swiftpack.co - danielsaidi/SystemNotification as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by danielsaidi.
danielsaidi/SystemNotification 0.5.1
SystemNotification is a SwiftUI library that lets you mimic the native iOS system notification.
⭐️ 135
🕓 8 weeks ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/danielsaidi/SystemNotification.git", from: "0.5.1")

SystemNotification Logo

Platform Swift 5.6 MIT License Twitter: @danielsaidi

About SystemNotification

SystemNotification is a SwiftUI library that lets you mimic the native iOS system notification that for instance is presented when toggling silent mode on and off on your iPhone.

The result can look like this, or completely different:

These notifications have a default style, but can be customized to great extent to fit your specific needs.

Supported Platforms

SystemNotification supports iOS v14, macOS v11, tvOS v14 and watchOS v7.


SystemNotification can be installed with the Swift Package Manager:


or with CocoaPods

pod SystemNotification

Getting started

To get started with SystemNotification, have a look at this getting started guide.


The online documentation contains more information, code examples etc. and makes it easy to overview the various parts of the library.

The online documentation is currently iOS only. To generate documentation for other platforms, open the package in Xcode, select a simulator then run Product/Build Documentation.

Demo Application

This project contains a demo app that lets you explore SystemNotification on iOS. To run it, just open and run Demo/Demo.xcodeproj.


You can sponsor this project on GitHub Sponsors or get in touch for paid support.


Feel free to reach out if you have questions or if you want to contribute in any way:


SystemNotification is available under the MIT license. See the LICENSE file for more info.


Stars: 135
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

17 weeks ago

This release greatly improves how notifications are presented and dismissed and simplifies usage.

The demo app now uses a local package, which makes it a lot easier to develop the library.

📖 Documentation

SystemNotification has a brand new DocC documentation.

Due to the new documentation, the package now requires Swift 5.5.

✨ New features

  • SystemNotificationContext has a new completion-based dismiss function.
  • SystemNotificationMessageConfiguration has new iconTextSpacing and titleTextSpacing properties.
  • SystemNotificationUIKitOverlay is a new view that simplifies adding a system notification to a UIKit view.
  • View+SystemNotification has a new parameter-based extension that replaces the old notification-based one.

💡 Behavior changes

  • SystemNotificationMessageConfiguration is adjusted to make a message look more like an iPhone system notification.
  • Presenting a new notification first dismisses the current notification, if any.
  • The auto-dismiss logic is moved from the system notification to the notification context.

🐛 Bug fixes

  • This version fixes a bug, where the message configuration padding was incorrectly applied.

🗑 Deprecated

  • The notification-based systemNotification(:) function is deprecated.

💥 Breaking changes

  • SystemNotification+Message has been deprecated.
  • SystemNotificationConfiguration minWidth is no longer used and has been removed.
  • View+SystemNotification has deprecated the SystemNotification-based extension.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics