You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it is possible to remove individual notifications on Android by calling the .removeNotification(int) method and there's also a method called .clearOneSignalNotifications() which will remove all app notifications (however this also only works on Android).
A few years ago it was mentioned that there will be a major version which will add this functionality to both the Android and iOS SDKs (OneSignal/OneSignal-iOS-SDK#646 (comment)), however, currently I can't seem to find any methods I can use for iOS.
Is this still planned or am I missing something obvious? Searching for removeDeliveredNotifications in the iOS SDK doesn't yield any results, which makes me assume this functionality wasn't implemented yet.
Are there any workarounds?
The text was updated successfully, but these errors were encountered:
@jozsefsallai Thanks for digging in, there isn't a method in the current OneSignal SDK to clear notifications on iOS. However this can be worked around by setting the app's badge value to something like 1 then back to 0, iOS has a side effect with this where it will clear all notifications for the app. I don't believe Flutter has a way to set the iOS badge value, however a 3rd party library could be used to do so. As an example flutter_app_badger, but I have not used this to confirm it will work.
Hello!
Currently, it is possible to remove individual notifications on Android by calling the
.removeNotification(int)
method and there's also a method called.clearOneSignalNotifications()
which will remove all app notifications (however this also only works on Android).A few years ago it was mentioned that there will be a major version which will add this functionality to both the Android and iOS SDKs (OneSignal/OneSignal-iOS-SDK#646 (comment)), however, currently I can't seem to find any methods I can use for iOS.
Is this still planned or am I missing something obvious? Searching for
removeDeliveredNotifications
in the iOS SDK doesn't yield any results, which makes me assume this functionality wasn't implemented yet.Are there any workarounds?
The text was updated successfully, but these errors were encountered: