Closed Bungeefan closed 10 months ago
One possible reason could be the hard-coded UNNotificationPresentationOptions
in the following code that handles local notifications:
Which would explain why, even though the list
option was specified when sending the local notification, the notification still vanished.
A better "equivalent" to the deprecated alert
option (if that was the desired target for this code) would be banner
and list
according to the Apple Docs.
So even though, this would still override/replace the options specified in flutter_local_notifications
, it would achieve feature parity with the APNS notifications which is probably the most desired case when using this package combination.
Unfortunately, I am currently unable to continue code research for this issue from my side.
@Bungeefan, I created a PR that should resolve your issue in case your local notification includes appropriate parameters - https://github.com/ben-xD/push/pull/33
Thanks to @Arley011, this has been resolved with push 1.0.5
I am experiencing a weird bug, I implemented
push
to receive remote notifications, but as these are not showing while the app is in the foreground, I also had to addflutter_local_notifications
to show them in theonMessage
call from this package. This works on both of our supported platforms, Android and iOS, quite fine.Problem
However, on iOS these local notifications are only shown as banner and do not persist in the notification center, first I thought that this could be some bug/limitation in the
flutter_local_notifications
library or from iOS itself, but using their example it works flawlessly. So back topush
, I tried the example from this repo and experienced the same behavior as in our app. Weird, aspush
AFAIK doesn't manage local notifications in any way.As a final test, I only removed the
push
dependency from our app and tried again sending a local notification (with the same code as before), and lo and behold it worked just fine and even showed up in the center afterward. I even completely reinstalled our app to avoid any user setting from our side affecting it. No luck.Now what?
I have honestly no clue why this behavior happens, however, I am now quite sure that the culprit lies, at least partly, in this package. Furthermore, I couldn't find any
cancel
calls to the notification center inpush_ios
(why should there even be any) and I couldn't yet identify any other possible reason why this could be happening.I will try to continue investigating to hopefully find a solution/reason, but my iOS developing experience is very limited, therefore, I would be quite happy if anybody with more knowledge could assist me in this weird case. I am ready to test/record everything needed!