PushNotifications does not have web implementation.
See original GitHub issueDescription of the problem:
getting “PushNotifications does not have web implementation.” after the app is booted on android emulator, i’m loading the app from an external URL with the capacitor config variable:
"server": {
"url":"https://MY-SITE.com"
}
import { Plugins } from '@capacitor/core';
const { Device, PushNotifications } = Plugins;
class Notifications {
notifications = [];
constructor() {
PushNotifications.register();
PushNotifications.addListener('registration', (token) => {
console.log('token ' + token.value);
});
PushNotifications.addListener('registrationError', (error) => {
console.log('error on register ' + JSON.stringify(error));
});
PushNotifications.addListener('pushNotificationReceived', (notification) => {
console.log('notification ' + JSON.stringify(notification));
this.notifications.push(notification);
});
PushNotifications.addListener('pushNotificationActionPerformed', (notification) => {
console.log('notification ' + JSON.stringify(notification));
this.notifications.push(notification);
});
}
}
export default new Notifications();
Affected platform
- Android
- iOS
- electron
- web
OS of the development machine
- Windows
- [ x] macOS
- linux
Other information: i’m following the example https://github.com/jcesarmobile/ionic-angular-capacitor-push-example but instead of Angular i’m using React
Capacitor version: @capacitor/core@1.0.0-beta.19 node version: v11.14.0 npm version: 6.9.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Error: Uncaught (in promise): PushNotifications does not have ...
Just wanted to know how to implement PushNotification for web in ionic using capacitor . if there is any plugin or atleast if...
Read more >PushNotifications does not have web implementation #2659
After using npx add ios and running app from xcode, it works fine. At least it says that remote notifications are not supported...
Read more >Uncaught (in promise): PushNotifications does not have web ...
ERROR Error: Uncaught (in promise): PushNotifications does not have web implementation. How to catch this exception for web implementation, ...
Read more >Push Notifications Capacitor Plugin API
The Push Notifications API provides access to native push notifications. ... There is no need to add the Firebase SDK to your app...
Read more >Web Push Notifications Explained - Airship
Learn about web push notifications, what they look like, technical requirements for implementation and how to use them to drive customer engagement &...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Updating npm packages should be enough. Sometimes if we did changes in the templates you should do them too (but most times it’s just to update dependencies of the native libraries). At the moment we are not documenting those changes, once we release the final release we will do it.
Please, don’t use unrelated issues to ask questions. If you have questions we have a capacitor dedicated slack https://getcapacitor.herokuapp.com/ and forums https://forum.getcapacitor.com/ or even on stackoverflow using capacitor tag.
On beta 22 those both events should work fine