Closed gregd closed 6 years ago
In future its possible by defining skipLocalNotificationReady
.
window.skipLocalNotificationReady = true
Once the app and Ionic is ready, you can fire the queued events manually.
cordova.plugins.notification.local.fireQueuedEvents();
Hi Sebastián,
I used the version with the commit of Feb 5 (using skipLocalNotificationReady and fireQueuedEvents()) in iOS 11.2 simulator and iOS 10.3.3 on a physical device (iPhone5 ). In both cases when I start the app from a notification, the startup screen appears and then, after a second or so, the screen turns black, the app crashes apparently. After approx. 10 seconds the screen returns to one of the home/app pages of iOS from where I selected the notification. It doesn't matter if I call the related code or comment them, the behavior is identical. Reverting to 0.9.0-beta.2 solves the black-screen issue.
Any idea where this might come from?
@rapoell Yes I experienced that and its already fixed with beta.3
@katzer Hi Sebastián, thanks, I'll test the new version in the next couple of days.
Ionic 3 has lazy loading which seems to break Cordova deviceready callback order. I posted the bug here https://github.com/ionic-team/ionic/issues/13525 It seems that Ionic
platform.ready().then(() => { ... }
is called after LocalNotificationsdeviceready
callback. It would be good to have a work around to manually trigger below code fromplatform.ready().then(...)
callback.I guess this can be done with plugin configuration option and with new LocalNotification method. The method should be called after event handlers like
click
are registered.Your Environment
cordova -v
): 7.1.0cordova platform ls
): android 6.3.0Steps to Reproduce
Described here https://github.com/ionic-team/ionic/issues/13525