iOS 11 plugin 0.8.4 AND 0.9.0-beta.2 not working
See original GitHub issueWARNING: IF YOU IGNORE THIS TEMPLATE, WE’LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!
Provide a general summary of the issue.
Notifications are never triggered and permission request also not showed, brand new app. cordova.plugins.
cordova.plugins.notification.local.schedule({ title: ‘Design team meeting’, text: ‘3:00 - 4:00 PM’, trigger: { at: (new Date()).getTime() }, foreground: true });
After this code cordova.plugins.notification.local.getAll(function(nots){console.log(nots)}) gives me the correct list but no notification is triggered Array (1) 0 Object actions: [] (0) attachments: [] (0) autoClear: true defaults: 0 foreground: false groupSummary: false id: 1 launch: true led: true lockscreen: true meta: {version: “0.9-beta.2”, plugin: “cordova-plugin-local-notification”} number: 0 priority: 0 progressBar: {enabled: false, value: 0} showWhen: true silent: false smallIcon: “res://icon” sound: true text: “3:00 - 4:00 PM” title: “Uno” trigger: {at: 1521033900000, type: “calendar”} vibrate: false wakeup: true
Your Environment
- Plugin version: 0.8.4 AND 0.9.0-beta.2
- Platform: iOS
- OS version: 11.2.5
- Device manufacturer / model: Apple iPhone 8
- Cordova version (
cordova -v
): 8.0.0 - Cordova platform version (
cordova platform ls
): osx ~4.0.1 - Plugin config cordova-plugin-badge 0.8.7 “Badge” cordova-plugin-device 2.0.1 “Device” cordova-plugin-local-notification 0.9.0-beta.2 “LocalNotification” cordova-plugin-whitelist 1.3.3 “Whitelist”
- Ionic Version (if using Ionic) No
Expected Behavior
notifications triggered Tell us what should happen notifications should be triggered
Actual Behavior
nothing happens Tell us what happens instead nothing
Steps to Reproduce
Reproduce this issue; include code to reproduce, if relevant
cordova.plugins.notification.local.schedule({ title: ‘Design team meeting’, text: ‘3:00 - 4:00 PM’, trigger: { at: (new Date()).getTime() }, foreground: true });
Context
What were you trying to do?
Debug logs
Include iOS / Android logs
- ios XCode logs
- Android: $ adb logcat
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
@voidbrain Try making your trigger a date object (don’t call .getTime() on new Date()), when you call .getTime() it returns a number object.
And yes, I’d recommend using an id (that is an int) for each notification. (I can’t point to a reason why, but I always have and haven’t had difficulties with the plugin!)
` cordova.plugins.notification.local.cancelAll(function(){
` with 0.9-beta.2 works. Thank you