swiftDialog allows you to send notifications using the --notification argument. This indicates that swiftDialog should send a notification instead of showing a dialog window.
Notifications use the same --title, --message and --icon arguments to present text and media. Any other arguments not listed on this page are ignored.
There is an additional argument --subtitle which adds a subtitle to the notification.
From v3.1, swiftDialog routes notifications through dedicated helper applications embedded inside Dialog.app. Use the --style argument to select the notification type:
--style value
Behaviour
Helper used
banner
System notification that appears briefly then dismisses automatically
Dialog Banner
alert
System notification that persists until the user dismisses it
Dialog Alert
pseudo
Pseudo notification banner (same as pseudo-banner)
Main app
pseudo-banner
Pseudo notification that auto-dismisses after a timeout
Main app
pseudo-alert
Pseudo notification that stays until user interaction
Main app
The default when --style is omitted depends on the system notification settings configured for the app.
Calling --notificationwithout--style still works for backwards compatibility but routes through the main Dialog.app bundle. This path is deprecated and will emit a warning to stderr:
In a future release, sending a notification without --style will default to --style banner.
To ensure the style types are correctly set for system notifications, deploy a mobileconfig that pre-approves notifications for the relevant helper apps (au.csiro.dialog.banner and au.csiro.dialog.alert) with the desired notification style.
dialog--notification--stylebanner--title"Test Notification"--message"A test notification message"
Sending a persistent alert notification:
Terminal window
dialog--notification--stylealert--title"Test Notification"--message"A test notification message"
If the message is longer than what the notification can show, the message will be truncated and show elipses ... to indicate as such. There should also appear a chevron in the top right of the notification when the user hovers over the notification that lets the user expand the contents
Adding a subtitle:
Terminal window
dialog--notification--stylebanner--title"Test Notification"--message"A test notification message"--subtitle"Test Subtitle"
Including title and subtitle a notification can have up to 5 lines of text. A \n character within the message body will create a newline in the notification.
An image can be added with --icon and accepts all existing image formats and sources.
When displaying an image, the content of the notification can be expanded by the user
Note: You cannot replace the default icon that is displayed with the notification. Images added using --icon will appear within the notification
Pseudo notifications are custom notification-style windows rendered by swiftDialog itself, rather than macOS system notifications. They slide in from the right edge of the screen and mimic the appearance of native notifications with a translucent material background.
Custom icon support — The icon displayed on the notification is fully customisable using --icon, including SF Symbols, URLs, file paths, and app bundles. Unlike system notifications, this does not require setting the Dialog.app bundle icon and restarting NotificationCenter.
No MDM profile required — Pseudo notifications do not go through the macOS notification center, so no mobileconfig or notification permissions are needed.
Inline images — Use --image to display an image within the notification body.
Inline markdown — The --message content supports inline markdown formatting.
Pseudo notifications are not system notifications. They do not persist once dismissed and do not follow the standard rules for macOS system notifications. They also do not stack. Multiple pseudo notifications can be sent but they will appear on top of each other until they are dismissed. If this is important to you then use regular system notifications.
Clicking the notification body or Button 1 executes --button1action.
Clicking Button 2 executes --button2action.
If neither --button2text nor --button2action is specified, the action bar is hidden and clicking anywhere on the notification triggers --button1action.
When the user hovers over a pseudo notification, a close button (×) appears in the top-left corner. Clicking it dismisses the notification with the same behaviour as a timeout (slides out, exits with code 0, no button action executed).
Pseudo notifications display a “now” timestamp next to the title. After 60 seconds this updates to “1m ago” and continues updating every 60 seconds for as long as the notification remains visible.
When sending a new pseudo notification with the same identifier as an existing one, the old notification is automatically dismissed before the new one appears.
When you first use notifications you may not receive any feedback or be prompted to allow notifications.
To manually allow notifications you will need to go to System Settings -> Notifications and enable notifications for the relevant application(s). You can also select between None, Banner or Alert style.
When deploying swiftDialog via MDM it is preferred to deploy a mobileconfig that will pre-approve notifications and set the notification type.
If you have a mixed installation you can include multiple bundle entries in the same profile. An example payload for banner style notifications might look like this:
Notifications are not available: Couldn't communicate with a helper application
verify that the relevant Dialog application has notifications enabled in System Settings, either by applying one of the above mobileconfig files via MDM or manually in System Settings.
Notifications will use the default swiftDialog icon. If you would like to re-brand to use a different icon, e.g. a corporate identity, then you can use the following steps to update the app bundle icon to something more appropriate for your use.
In macOS 26.4 updating the app bundle icon and therefore the notification icon no longer works correctly. If branding is important then use the new pseudo notification feature, which presents a similar UI to system notifications but doesn’t use the macOS system notification system, therefore may not be appropriate to all situations.
Copy your replacement icon image to /Library/Application Support/Dialog/Dialog.png (case sensitive)
Install swiftDialog from the .pkg installer.
With the replacement Dialog.png in place the installer will replace the built in icon with the specified image. Notifications will then use the custom image as the notification icon.