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.

Click events not firing iOS

See original GitHub issue

WARNING: IF YOU IGNORE THIS TEMPLATE, WE’LL IGNORE YOUR ISSUE. YOU MUST FILL THIS IN!

Click events not firing when app closed. If app already open then click event fires as expected.

Your Environment

  • Plugin version: 0.9.0-beta.2
  • Platform: Mac OS
  • OS version: 12.1
  • Device manufacturer / model: All apple devices
  • Cordova version (cordova -v): 8.0.0
  • Cordova platform version (cordova platform ls): 4.5.5
  • Plugin config
  • Ionic Version (if using Ionic)

Expected Behavior

When app closed and notification clicked / opened click event should fire.

Actual Behavior

When app closed and notification clicked click event does not fire. If app already open, click event fires as expected with notification data. Android works as expected in both scenarios.

Context

Great plugin - well done. This was working fine, however has seemed to stop working with latest releases of iOS (12+)

var app = { initialize: function() { document.addEventListener('deviceready', this.onDeviceReady.bind(this), false); }, onDeviceReady: function() { cordova.plugins.notification.local.on("click", function (notification, state) {alert(JSON.stringify(notification));}, this); }, receivedEvent: function(id) {} };

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
kasbackcommented, May 17, 2019

Issue still persists Platform: Mac OS OS version: 12.1.4 Device manufacturer / model: iPhone Cordova version (cordova -v): 9.0.0 Cordova platform version (cordova platform ls): 4.5.5 Ionic plugin: ionic-native/local-notifications": “^5.3.0” Cordova plugin: cordova-plugin-local-notification": "0.9.0-beta.3

0reactions
askonacommented, Dec 3, 2019

I’m sure, that the reason of this issue, is that other plugins (Firebase for ex.) overriding code, which reassigning delegate of notification center. [UNUserNotificationCenter currentNotificationCenter].delegate = self; How to avoid that - I’m trying to figure out…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Click events not firing on iOS - Stack Overflow
I have a stop immediateprop to stop clicking the checkbox from activating the slidetoggle however on iOS, it will not even drop until...
Read more >
Click events not being triggered with ios touch devices #7635
If you want to capture click events anywhere on the page, try rendering a <div/> that fills the page and attack an onClick...
Read more >
Fix jQuery Click Event on Touch Devices (IOS) - Ahmad Shyk
If jQuery click event is not working on touch devices especially iPhone or iPad, the fix is quite simple. Lets say we have...
Read more >
Safari 16 on iOS not firing (some)… | Apple Developer Forums
The 'onclick' event does fire every time. The weird thing is this only happens when the web app is running on standalone mode...
Read more >
How to fix: iPad does not trigger click event on some elements
iPads will not trigger click events for all elements. ... works on a desktop browser, clicking the row/cell on an iPad will just...
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