Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch Silent notification on iOS #845

Closed
1 task done
tmishutin opened this issue Jan 9, 2023 · 1 comment
Closed
1 task done

Catch Silent notification on iOS #845

tmishutin opened this issue Jan 9, 2023 · 1 comment

Comments

@tmishutin
Copy link

tmishutin commented Jan 9, 2023

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

  • I agree to follow this project's Code of Conduct
@nan-li
Copy link
Contributor

nan-li commented Oct 24, 2024

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.

@nan-li nan-li closed this as completed Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants