cordova-plugin-local-notifications
cordova-plugin-local-notifications copied to clipboard
Notifications not firing in iOS 14
WARNING: IF YOU IGNORE THIS TEMPLATE, WE'LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!
Provide a general summary of the issue.
Your Environment
- Plugin version: 0.9.0-beta.2
- Platform: iOS
- OS version: 14.0.1
- Device manufacturer / model: Apple
- Cordova version (
cordova -v
): 9.0.0 - Cordova platform version (
cordova platform ls
): android 8.1.0 browser 6.0.0 ios 5.1.1 - Plugin config
- Ionic Version (if using Ionic)
Expected Behavior
Permission dialog appears on first schedule of a notification and the app shows up in the list of apps receiving notifications under Settings > Notifications
Actual Behavior
Dialog does not appear and the app doesn't show up in the list of apps receiving notification.
Steps to Reproduce
Try running under iOS 14.
Context
Here is the code I am using: export function scheduleNotification(notificationId, title, content, deliveryDateTime) { if (typeof cordova !== 'undefined' && cordova.plugins.notification != undefined) { let delivery = new Date(deliveryDateTime.ts) cordova.plugins.notification.local.hasPermission(function (granted) { if (granted) { cordova.plugins.notification.local.schedule({ id: notificationId, title: title, text: content, trigger: { at: delivery }, foreground: true });
console.log("Schedule #" + notificationId + ": " + content + " at " + delivery);
}
});
} }
Debug logs
There are no crash logs -- just no notifications or permissions requests.
anyone got input on this? @mikenowakme ?
UPDATE: the issue was not iOS version but rather not firing well when app in foreground on iOS. might be collision with phongap push plugin. investigating further
It worked better when I manually requested permission. I am not using phonegap should there be no conflict there.
Hello, Still cannot get local notifications (pop up) when I send push notifications, on emulator neither iphone real, how can I find a solution? Thank you!
Hi all, perhaps you can try this fork, it is more recent and still maintained (to my knowledge): https://github.com/timkellypa/cordova-plugin-local-notifications
Hope it helps. Thanks.
Hi all, perhaps you can try this fork, it is more recent and still maintained (to my knowledge): https://github.com/timkellypa/cordova-plugin-local-notifications
Hope it helps. Thanks.
Can you explain please how to install it and so on? thank you
Hello?
@manel00 cordova plugin add https://github.com/timkellypa/cordova-plugin-local-notifications.git
should work for you
In my case I realized I didn't call await LocalNotifications.requestPermissions()
before trying to send the notification. Note that the latest version of the project is now at https://github.com/ionic-team/capacitor-plugins/