Skip to content

Commit 861136a

Browse files
committed
Updated readme
1 parent 030e359 commit 861136a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
## Usage
44
Calling `Notifications.ShowNotification` will display a notification using your OS's notification manager.
55

6-
On MacOS, you need to specify the `BundleIdentifier` and this needs to correspond to a defined identifier, otherwise no notification will be shown.
6+
On MacOS, you need to specify the `BundleIdentifier` and this needs to correspond to a defined identifier, otherwise no notification will be shown. Also, it must be specified whether the application is a console or GUI application, using `SetGuiApplication`, because if it is a GUI application and it is specified that it is a console application, the application would hang.
77
For cross-platform compatibility, it's better to always do this. So, creating a notification will look like this:
88
```cs
99
Notifications.BundleIdentifier = "com.apple.finder";
10+
Notifications.SetGuiApplication(true); // false for console application
1011
Notifications.ShowNotification("notification-title");
1112
```
1213

0 commit comments

Comments
 (0)