I’m using local notifications native plugin on my ionic 4 project (latest version), but when I click on notification and my app is closed the click event is not triggered. It works when app is in background or foreground in ios device. I use local notifications inside a provider and my on click code is inside its constructor but when app is closed it's not working. I’ve tried to write code inside platform ready in app/app.component.ts but this approach does not work. This is my code:
this.platform.ready().then((readySource) => {
this.localNotifications.on('click').subscribe(noti)=> {
alert("ok");
});
});