question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

iOS 11 plugin 0.8.4 AND 0.9.0-beta.2 not working

See original GitHub issue

WARNING: 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:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Tawpiecommented, Feb 14, 2018

@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!)

0reactions
voidbraincommented, Feb 15, 2018

` cordova.plugins.notification.local.cancelAll(function(){

   for(i=1;i<4;i++){

       cordova.plugins.notification.local.schedule({    

             id:i,

             title: 'notifica '+i,

             text: 'suvvia',

             trigger: { at: new Date(2018, 1, 15, 15, 17+i) },
             foreground: true
         });
}})

` with 0.9-beta.2 works. Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

If your iPhone or iPad won't update - Apple Support
Go to Settings > General > [Device name] Storage. Learn more about the space your apps and content use.
Read more >
FCM and local notifications on iOS - Ionic Forum
Hi there, As i recently discovered, the fcm-plugins and the local-notifications-plugin dont work well together on current iOS versions.
Read more >
Cordova app crashes after I touch the screen with targetSdk 30
I am using cordova-android@10.0.0 to build the app. Though the app gets built successfully and also gets installed on the device.
Read more >
antd-mobile - UNPKG
22, "url": "http://github.com/ant-design/ant-design-mobile/issues" ... "eslint-plugin-jsx-a11y": "^5.0.1",. 96, "eslint-plugin-markdown": "~1.0.0-beta.6",.
Read more >
'referenceurl' was deprecated in ios 11.0: will be removed in a future ...
I did tried almost all provided suggestions/fixes in GH issues of flutter, ... I was building flutter app with tflite 0.9.0 plugin on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found