feat: allow immediate MacOS notifications (#16060)
* feat: allow immediate MacOS notifications * fix args->GetNext * update docs/api/system-preferences.md Co-Authored-By: codebytere <codebytere@github.com> * address feedback from @ckerr's review
This commit is contained in:
parent
c7aa747891
commit
280f9bf49c
3 changed files with 26 additions and 35 deletions
|
@ -59,10 +59,11 @@ Returns `Boolean` - Whether the system is in Dark Mode.
|
|||
|
||||
Returns `Boolean` - Whether the Swipe between pages setting is on.
|
||||
|
||||
### `systemPreferences.postNotification(event, userInfo)` _macOS_
|
||||
### `systemPreferences.postNotification(event, userInfo[, deliverImmediately])` _macOS_
|
||||
|
||||
* `event` String
|
||||
* `userInfo` Object
|
||||
* `deliverImmediately` Boolean (optional) - `true` to post notifications immediately even when the subscribing app is inactive.
|
||||
|
||||
Posts `event` as native notifications of macOS. The `userInfo` is an Object
|
||||
that contains the user information dictionary sent along with the notification.
|
||||
|
@ -342,4 +343,4 @@ Returns `Promise<Boolean>` - A promise that resolves with `true` if consent was
|
|||
|
||||
**Important:** In order to properly leverage this API, you [must set](https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_macos?language=objc) the `NSMicrophoneUsageDescription` and `NSCameraUsageDescription` strings in your app's `Info.plist` file. The values for these keys will be used to populate the permission dialogs so that the user will be properly informed as to the purpose of the permission request. See [Electron Application Distribution](https://electronjs.org/docs/tutorial/application-distribution#macos) for more information about how to set these in the context of Electron.
|
||||
|
||||
This user consent was not required until macOS 10.14 Mojave, so this method will always return `true` if your system is running 10.13 High Sierra or lower.
|
||||
This user consent was not required until macOS 10.14 Mojave, so this method will always return `true` if your system is running 10.13 High Sierra or lower.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue