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
We need to remove delivered push message from screen based on collapseId from silent message.
In older version of plugin it was possible to use processNotificationReceived where I could do something with message. if ([json[@"payload"][@"title"] length] == 0 && [json[@"payload"][@"body"] length] == 0) { [[UNUserNotificationCenter currentNotificationCenter] removeDeliveredNotificationsWithIdentifiers:@[ [NSString stringWithFormat:@"%@",json[@"payload"][@"additionalData"][@"collapseId"]] ]]; }
From debug I see that this function is always being called: oneSignalReceiveRemoteNotification
(based on log: oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler).
Currently I'm stuck and don't see a way to do that. Would appreciate any help on how to port this code to the new SDK.
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Hi, we have had no further reports of this. Please upgrade the OneSignal SDK if you or anyone is still having this issue. If this is still an issue, please open a new report with updated information.
How can we help?
We need to remove delivered push message from screen based on collapseId from silent message.
In older version of plugin it was possible to use processNotificationReceived where I could do something with message.
if ([json[@"payload"][@"title"] length] == 0 && [json[@"payload"][@"body"] length] == 0) { [[UNUserNotificationCenter currentNotificationCenter] removeDeliveredNotificationsWithIdentifiers:@[ [NSString stringWithFormat:@"%@",json[@"payload"][@"additionalData"][@"collapseId"]] ]]; }
From debug I see that this function is always being called: oneSignalReceiveRemoteNotification
(based on log: oneSignalReceiveRemoteNotification:UserInfo:fetchCompletionHandler).
Currently I'm stuck and don't see a way to do that. Would appreciate any help on how to port this code to the new SDK.
Code of Conduct
The text was updated successfully, but these errors were encountered: