如何抑制查看按钮推送通知?

发布于 2024-09-03 06:54:11 字数 138 浏览 1 评论 0原文

在苹果文档中,他们显示了一个通知,其中没有查看按钮,只有一个“确定”按钮。

我怎样才能在我的应用程序中执行此操作。

这是否必须在有效负载代码中或本地应用程序中实现?


感谢任何帮助,谢谢!

In the apple documentation, they show a notification where there's no view button, just an "OK" button.

How could I do this in my app.

does this have to be implemented in the payload code, or in the local app?

any help is appreciated, thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

自我难过 2024-09-10 06:54:11

没关系,我发现它与消息的“body”元素有关:

这是一个例子

{"aps":
     {"alert":{"body":"You got a new message!",
     /* You can change "action-loc-key" to what you want the 'action' button
       to say. (In this case, nothing) */
     "action-loc-key":null},
     "badge":0,
     "sound":"beep.wav"},
"acme1":"bar",
"acme2":42
}

nevermind, I found it has to do with the "body" element of the message:

Here's an example

{"aps":
     {"alert":{"body":"You got a new message!",
     /* You can change "action-loc-key" to what you want the 'action' button
       to say. (In this case, nothing) */
     "action-loc-key":null},
     "badge":0,
     "sound":"beep.wav"},
"acme1":"bar",
"acme2":42
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文