It seems the warning use of string literal for Objective-C selectors is deprecated is unrelated, as when it is fixed, the didReceiveLocalNotification still does not fire.
To get it working, I updated the selector and removed the quotes from CDVLocalNotification.
Also, I had to re-broadcast the event from AppDelegate using the following code, as I suspect another plugin may be interfering with this observer working.
I can make a PR for the selector and name update, but I am less sure of what to do to ensure the UILocalNotification event is received, as my solution feels like a bit of a hack.
EDIT: I believe there are other installed plugins interfering with the events/observers. I believe a way to get around this is this plugin: https://github.com/katzer/cordova-plugin-app-event. This rebroadcasts events so that multiple plugins can listen to the same one without interference.
It seems that there is something wrong with the addObserver call in the pluginInitialize on iOS: (tested on iOS 9 and 10)
It seems the warning
use of string literal for Objective-C selectors is deprecated
is unrelated, as when it is fixed, the didReceiveLocalNotification still does not fire.To get it working, I updated the selector and removed the quotes from
CDVLocalNotification
.Also, I had to re-broadcast the event from AppDelegate using the following code, as I suspect another plugin may be interfering with this observer working.
I believe https://github.com/cowbell/cordova-plugin-geofence/issues/182 and https://github.com/cowbell/cordova-plugin-geofence/issues/180 are duplicates of this, but with less detail.
I can make a PR for the selector and name update, but I am less sure of what to do to ensure the UILocalNotification event is received, as my solution feels like a bit of a hack.
EDIT: I believe there are other installed plugins interfering with the events/observers. I believe a way to get around this is this plugin: https://github.com/katzer/cordova-plugin-app-event. This rebroadcasts events so that multiple plugins can listen to the same one without interference.