SOL
FIND
Web Lens
Portal home
Home
|
New Lens
|
About
Web address:
pushNotifications | Electron
https://www.electronjs.org/ja/docs/latest/api/push-notifications • 42 KB fetched
Open original page
pushNotifications | Electron メインコンテンツへ飛ぶ Electron ドキュメント API ブログ ツール * Electron Forge * Electron Fiddle コミュニティ * ガバナンス * 事例紹介 * リソース リリース 日本語 * English * Deutsch * Español * Français * 日本語 * Português * Русский * 中文 検索 * メインプロセスモジュール * app * autoUpdater * BaseWindow * BrowserView * Deprecated * BrowserWindow * clipboard * contentTracing * crashReporter * desktopCapturer * dialog * globalShortcut * ImageView * inAppPurchase * ipcMain * Menu * MenuItem * MessageChannelMain * MessagePortMain * nativeImage * nativeTheme * net * netLog * Notification * powerMonitor * powerSaveBlocker * process * protocol * pushNotifications * safeStorage * screen * session * sharedTexture * ShareMenu * shell * systemPreferences * TouchBar * Tray * utilityProcess * webContents * WebContentsView * webFrameMain * 表示 * レンダラープロセスモジュール * Utility Process Modules * カスタム DOM 要素 * Chromium と Node.js * クラス * API の構造体 * * メインプロセスモジュール * pushNotifications 目次 pushNotifications プロセス: メイン リモートのプッシュ通知サービスに登録し、通知を受け取ります。 例えば、以下は Apple のプッシュ通知サービス (APNS) を利用してプッシュ通知に登録する場合です。 const { pushNotifications , Notification } = require ( 'electron' ) pushNotifications . registerForAPNSNotifications ( ) . then ( ( token ) => { // リモート通知サーバへトークンを転送します } ) pushNotifications . on ( 'received-apns-notification' , ( event , userInfo ) => { // userInfo フィールドを元に新規 Notification オブジェクトを生成します } ) イベント pushNotification モジュールは以下のイベントが発生します。 イベント: 'received-apns-notification' macOS 戻り値: * event Event * userInfo Record<String, any> アプリの実行中にリモート通知を受信したときに発生します。 参考: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc メソッド pushNotification モジュールには以下のメソッドがあります。 pushNotifications.registerForAPNSNotifications() macOS 戻り値 Promise<string> Apple Push Notification サービス (APNS) にアプリを登録し、 バッジ、サウンド、アラート の通知を受け取れるようにします。 登録に成功した場合、APNS のデバイストークンで Promise が解決されます。 そうでない場合、エラーメッセージとともに Promise が拒否されます。 参考: https://developer.apple.com/documentation/appkit/nsapplication/1428476-registerforremotenotificationtyp?language=objc pushNotifications.unregisterForAPNSNotifications() macOS APNS からの通知の受信からアプリを登録解除します。 この方法で登録を解除したアプリはいつでも再登録できます。 参考: https://developer.apple.com/documentation/appkit/nsapplication/1428747-unregisterforremotenotifications?language=objc このページを編集 前 protocol 次 safeStorage * イベント * イベント: 'received-apns-notification' macOS * メソッド * registerForAPNSNotifications * unregisterForAPNSNotifications ドキュメント * 始めましょう * API リファレンス チェックリスト * パフォーマンス * セキュリティ ツール * Electron Forge * Electron Fiddle コミュニティ * ガバナンス * リソース * Discord * Bluesky * X * Mastodon * Stack Overflow その他 * GitHub * Open Collective * Infrastructure Dashboard Copyright OpenJS Foundation and Electron contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation , please see our Trademark Policy and Trademark List . Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them. The OpenJS Foundation | Terms of Use | Privacy Policy | Bylaws | Code of Conduct | Trademark Policy | Trademark List | Cookie Policy Hosting and infrastructure graciously provided by
Links found on this page
メインコンテンツへ飛ぶ
[
direct
]
Electron
[
direct
]
ドキュメント
[
direct
]
API
[
direct
]
ブログ
[
direct
]
Electron Forge
[
direct
]
Electron Fiddle
[
direct
]
ガバナンス
[
direct
]
事例紹介
[
direct
]
リソース
[
direct
]
リリース
[
direct
]
English
[
direct
]
Deutsch
[
direct
]
Español
[
direct
]
Français
[
direct
]
Português
[
direct
]
Русский
[
direct
]
中文
[
direct
]
autoUpdater
[
direct
]
BaseWindow
[
direct
]
BrowserView Deprecated
[
direct
]
BrowserWindow
[
direct
]
clipboard
[
direct
]
contentTracing
[
direct
]
crashReporter
[
direct
]
desktopCapturer
[
direct
]
dialog
[
direct
]
globalShortcut
[
direct
]
ImageView
[
direct
]
inAppPurchase
[
direct
]
ipcMain
[
direct
]
Menu
[
direct
]
MenuItem
[
direct
]
MessageChannelMain
[
direct
]
MessagePortMain
[
direct
]
nativeImage
[
direct
]
nativeTheme
[
direct
]
net
[
direct
]
netLog
[
direct
]
Notification
[
direct
]
powerMonitor
[
direct
]
powerSaveBlocker
[
direct
]
process
[
direct
]
protocol
[
direct
]
safeStorage
[
direct
]
screen
[
direct
]
session
[
direct
]
sharedTexture
[
direct
]
ShareMenu
[
direct
]
shell
[
direct
]
systemPreferences
[
direct
]
TouchBar
[
direct
]
Tray
[
direct
]
utilityProcess
[
direct
]
webContents
[
direct
]
WebContentsView
[
direct
]
webFrameMain
[
direct
]
表示
[
direct
]
カスタム DOM 要素
[
direct
]
Chromium と Node.js
[
direct
]
クラス
[
direct
]
API の構造体
[
direct
]
メイン
[
direct
]
https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc
[
direct
]
バッジ、サウンド、アラート
[
direct
]
https://developer.apple.com/documentation/appkit/nsapplication/1428476-registerforremotenotificationtyp?language=objc
[
direct
]
https://developer.apple.com/documentation/appkit/nsapplication/1428747-unregisterforremotenotifications?language=objc
[
direct
]
このページを編集
[
direct
]
パフォーマンス
[
direct
]
セキュリティ
[
direct
]
Discord
[
direct
]
Bluesky
[
direct
]
X
[
direct
]
Mastodon
[
direct
]
Stack Overflow
[
direct
]
GitHub
[
direct
]
Open Collective
[
direct
]
Infrastructure Dashboard
[
direct
]
OpenJS Foundation
[
direct
]
Trademark Policy
[
direct
]
SolFind Lens does not relay logins, forms, files, images, audio, or video.
Portal home
With content from
Curlie.org
- the largest human-edited directory of the web. Contribute by submitting a website or becoming an editor.