我可以判断 iOS 设备是否收到推送通知吗?
我想统计接收推送通知的设备数量。我需要计算接收通知的设备数量,而不是计算接受通知并打开应用程序的设备数量,因此 didReceiveRemoteNotification
和 didFinishLaunchingWithOpetions
行不通的。我无法在服务器端执行此操作,我必须在客户端执行此操作。
是否可以从客户端判断 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不认为你所要求的从客户端是可能的。应用程序知道通知已发送的唯一时间是当它在前台运行时(在这种情况下,
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.