Header menu logo fable-electron-docs-api

pushNotifications Type

⚠ Process Availability: Main ✔ | Renderer ❌ | Utility ❌ | Exported ✔ Process: Main> Register for and receive notifications from remote push notification servicesFor example, when registering for push notifications via Apple push notification services (APNS):

Static members

Static member Description

pushNotifications.offReceivedApnsNotification handler

Full Usage: pushNotifications.offReceivedApnsNotification handler

Parameters:
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Emitted when the app receives a remote notification while running. See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc

handler : IOnReceivedApnsNotification -> unit

pushNotifications.offReceivedApnsNotification handler

Full Usage: pushNotifications.offReceivedApnsNotification handler

Parameters:
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Emitted when the app receives a remote notification while running. See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc

handler : Event -> Record<string, obj> -> unit

pushNotifications.onReceivedApnsNotification handler

Full Usage: pushNotifications.onReceivedApnsNotification handler

Parameters:
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Emitted when the app receives a remote notification while running. See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc

handler : IOnReceivedApnsNotification -> unit

pushNotifications.onReceivedApnsNotification handler

Full Usage: pushNotifications.onReceivedApnsNotification handler

Parameters:
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Emitted when the app receives a remote notification while running. See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc

handler : Event -> Record<string, obj> -> unit

pushNotifications.onceReceivedApnsNotification handler

Full Usage: pushNotifications.onceReceivedApnsNotification handler

Parameters:
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Emitted when the app receives a remote notification while running. See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc

handler : IOnReceivedApnsNotification -> unit

pushNotifications.onceReceivedApnsNotification handler

Full Usage: pushNotifications.onceReceivedApnsNotification handler

Parameters:
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Emitted when the app receives a remote notification while running. See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc

handler : Event -> Record<string, obj> -> unit

pushNotifications.registerForAPNSNotifications ()

Full Usage: pushNotifications.registerForAPNSNotifications ()

Returns: Promise<string>
Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Registers the app with Apple Push Notification service (APNS) to receive Badge, Sound, and Alert notifications. If registration is successful, the promise will be resolved with the APNS device token. Otherwise, the promise will be rejected with an error message. See: https://developer.apple.com/documentation/appkit/nsapplication/1428476-registerforremotenotificationtyp?language=objc

Returns: Promise<string>

pushNotifications.unregisterForAPNSNotifications ()

Full Usage: pushNotifications.unregisterForAPNSNotifications ()

Modifiers: inline

⚠ OS Compatibility: WIN ❌ | MAC ✔ | LIN ❌ | MAS ❌

Unregisters the app from notifications received from APNS.Apps unregistered through this method can always reregister.See: https://developer.apple.com/documentation/appkit/nsapplication/1428747-unregisterforremotenotifications?language=objc

Type something to start searching.