我可以判断 iOS 设备是否收到推送通知吗?

发布于 2024-12-15 16:36:43 字数 236 浏览 4 评论 0原文

我想统计接收推送通知的设备数量。我需要计算接收通知的设备数量,而不是计算接受通知并打开应用程序的设备数量,因此 didReceiveRemoteNotificationdidFinishLaunchingWithOpetions行不通的。我无法在服务器端执行此操作,我必须在客户端执行此操作。

是否可以从客户端判断 iOS 设备是否已收到推送通知?

I want to count the number of devices that receive a Push Notificaiton. I need to count the devices that receive the notification, not the number of devices that accept the notification and open the app, so didReceiveRemoteNotification and didFinishLaunchingWithOpetions won't work. I can't do this on the server end, I have to do it on the client.

Is it possible to tell, from the client end, if an iOS device has received a Push Notificaiton?

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

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

发布评论

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

评论(1

謸气贵蔟 2024-12-22 16:36:43

我不认为你所要求的从客户端是可能的。应用程序知道通知已发送的唯一时间是当它在前台运行时(在这种情况下,didReceiveRemoteNotification 被调用)。如果应用程序未运行或处于后台,则它无法知道通知已到达。

I don't think what you're asking is possible from the client side. The only time an app knows a notification has been delivered is when it is running in the foreground (in that case, didReceiveRemoteNotification gets called). If the app isn't running or is in the background, it has no way of knowing a notification has arrived.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文