I am trying to set up my Vue application with Electron and electron-push-receiver.
I am using the following versions:
electron 11.1.1
electron-push-receiver: 2.1.3
I my regular Vue app, I can receive notifications from Firebase just fine. It has firebase 7.15.4 installed.
Now, using electron-push-receiver I can get a token (although I have no idea if it is registered with FCM..?), but when trying to receive messages and simply doing console.log for ON_NOTIFICATION_RECEIVE but it's not printing anything nor is it giving any errors.
The ipcRender is simply attached to the window using a preload.js script:
import { ipcRenderer } from 'electron'
window.ipcRenderer = ipcRenderer
which is properly defined as I succesfully get a token from NOTIFICATION_SERVICE_STARTED event.
How can I find out how to fix this? This functionality is crucial for my app. I really need to receive FCM notifications in Electon.
Any help is very much appreciated!
SOLVED:
I am using vue-cli-electorn-builder and turns out I had to set the following options on the electrionBuilder:{} plugin configuration:
@julianflapper can you please share the ( file / location of file ) where I have to add the above option? getting token but unable to receive message. Thanks
Hi,
I am trying to set up my Vue application with Electron and electron-push-receiver.
I am using the following versions:
I my regular Vue app, I can receive notifications from Firebase just fine. It has firebase 7.15.4 installed.
Now, using electron-push-receiver I can get a token (although I have no idea if it is registered with FCM..?), but when trying to receive messages and simply doing console.log for ON_NOTIFICATION_RECEIVE but it's not printing anything nor is it giving any errors.
This is a snippet of my code:
The ipcRender is simply attached to the window using a preload.js script:
which is properly defined as I succesfully get a token from NOTIFICATION_SERVICE_STARTED event.
How can I find out how to fix this? This functionality is crucial for my app. I really need to receive FCM notifications in Electon. Any help is very much appreciated!
SOLVED:
I am using vue-cli-electorn-builder and turns out I had to set the following options on the electrionBuilder:{} plugin configuration: