最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Flutter silent notifications do not trigger on iOS - Stack Overflow

programmeradmin3浏览0评论

I'm making this topic to see if anyone has experienced issues like I have, or if anyone has any tips.

So, long story short, I'm working on an app that has time sensitive content, and that content relies heavily on push notifications. The ideal scenario would look like:

  • Notification comes in

  • X time passes

  • Silent notification comes in with an identifier and the system deletes the first notification that came in, since that is no longer relevant.

I use FirebaseMessaging for notifications.

Currently I have a solution using flutter_local_notifications and it will delete the notification with

flutterLocalNotificationsPlugin
        .cancel(int.parse(message.data["deletion_id"]));

This works perfectly on Android, however on iOS the backgroundHandler:

_firebaseMessagingBackgroundHandler does not appear to be called at all.

I have added the necessary background modes, and I have followed the documentation exactly to the letter.

Anyone has managed to delete notifications? Any tips you are able to share?

Thanks!

发布评论

评论列表(0)

  1. 暂无评论