隐藏,不显示来自代码的远程通知(swift) [英] Hide, do not display remote notification from code (swift)

查看:32
本文介绍了隐藏,不显示来自代码的远程通知(swift)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在设备上通过代码收到远程通知后,是否可以不显示甚至取消远程通知?

is it possible to do not display or even cancel remote notification after receive it on device from code?

问候,拉德克

推荐答案

所以我将从我的服务器发送静默推送通知,然后根据有效负载我将显示或不显示带有声音的本地通知警报.你怎么看?

So I will send silent push notification from my server and then based on payload I will show or not local notification alert with sound. What do you think?

我知道如何清除现有通知,但我的意思是在此通知出现在 UI 中之前取消.也许我的问题没有那么精确.

I know how to clear existing notifications but I mean cancel before this notification appears in UI. Maybe I was not so precise in my question.

发送请求帮助.

这篇关于隐藏,不显示来自代码的远程通知(swift)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆