flutter_local_notifications icon indicating copy to clipboard operation
flutter_local_notifications copied to clipboard

String identifier of notifications on iOS

Open devxpy opened this issue 2 years ago • 1 comments

Thanks @MaikuB, for such amazing work on this plugin!

This issue is somewhat related to https://github.com/MaikuB/flutter_local_notifications/issues/1353.

  • iOS has an API that supports a String identifier.
  • APNs supports providing a String collapse-key, and then removing notifications using removeDeliveredNotifications. However FlutterLocalNotificationsPlugin.cancel() only takes an int value.

I was wondering if these native APIs can be accessed via this plugin?

Background - integer ids for notifications can be a bit limiting -- for e.g. our backend messages are identified via a UUID which can't be represented easily as a 32-bit integer.

On android this problem can be circumvented using tags, not sure how to do this on iOS.

devxpy avatar Jun 20 '22 19:06 devxpy

No they're not so you'll need to look at submitting PRs or roll your own solution. An integer id was used for covering how the primary ID on Android is an integer and this is how majority of notification libraries on other platforms tackle this too.

MaikuB avatar Jun 26 '22 09:06 MaikuB