SystemNotification is a Swift SDK that helps you mimic the native iOS system notification in SwiftUI.

What's New


This version adds predefined system notification messages and styles and makes it easier to present a message.

✨ New features

  • SystemNotificationContext has a new presentMessage function.
  • SystemNotificationMessage has new, predefined error, success, warning and silentMode messages.
  • SystemNotificationMessageStyle has new, predefined prominent, error, success and warning styles.

SystemNotification Logo

Version Swift 5.9 Swift UI MIT License Twitter: @danielsaidi Mastodon:

About SystemNotification

SystemNotification is a SwiftUI SDK that lets you mimic the native iOS system notification that are presented when you toggle silent mode, connect your AirPods, etc.

The result can look like this, or completely different:

System notifications can be styled and customized. You can use a native-looking SystemNotificationMessage view as the content view, or any custom view.


SystemNotification can be installed with the Swift Package Manager:

Getting started

With SystemNotification, you can add a system notification to any view just as you add a sheet, alert and fullScreenModal, by applying a systemNotification view modifier (preferably to the application root view).

State-based notifications take a boolean state binding and a view builder:

import SystemNotification

struct MyView: View {

    var isActive = false

    var body: some View {
        VStack {
            Button("Show notification") {
                isActive = true
        .systemNotification(isActive: $isActive) {
            Text("You can use any custom content view")

Context-based notifications just take a SystemNotificationContext instance and can then show many different notifications with a single modifier:

import SystemNotification

struct MyView: View {

    var notification = SystemNotificationContext()

    var body: some View {
        VStack {
            Button("Show text") {
                notification.present {
                    Text("Context-based notifications are more flexible.")
            Button("Show message") {
                notification.present {
                        icon: Text("👍"),
                        title: "Great job!",
                        text: "You presented a native-looking message!"

The SystemNotificationMessage view lets you easily mimic a native notification view, with an icon, title and text, but you can use any custom view as the notification body.

For more information about how to configure and style your notifications, predefined message types and styles, and how to create your own custom message types, please see the getting started guide.


The online documentation has more information, articles, code examples, etc.

Demo Application

The demo app lets you explore the library. To try it out, just open and run the Demo project.

Support my work

You can sponsor me on GitHub Sponsors or reach out for paid support, to help support my open-source projects.

Your support makes it possible for me to put more work into these projects and make them the best they can be.


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.


  • Swift Tools 5.9.0
View More Packages from this Author


  • None
Last updated: Thu May 30 2024 01:25:36 GMT-0900 (Hawaii-Aleutian Daylight Time)