如何从我们的服务器中找到发送给用户的 Apple 推送通知? [英] How to find the Apple Push Notification Delivered to user or not from our server?

查看:26
本文介绍了如何从我们的服务器中找到发送给用户的 Apple 推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 iPhone 应用程序中 Apple 推送通知服务的新手.我已经学习了这些教程和苹果文档,

Am new to Apple Push Notification services in iPhone app. I have learned these tutorials and apple document,

  • www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
  • www.raywenderlich.com/3525/apple-push-notification-services-tutorial-part-2

我们正在将通知从我们的服务器 (PHP) 推送到 Apple Push Notification Server,APNS 会将通知推送到设备.在这种情况下,我们如何知道通知是否已从我们的服务器成功发送给用户?如果我们向所有订阅用户(超过 100 个用户)发送通知,我们是否可以获得这 100 个用户的交付报告?

We are pushing a notification from our server (PHP) to Apple Push Notification Server and APNS will push the notification to devices. In this case how we can know the notification has delivered the user successfully or not from our server? If we send notification to all subscribed users (above 100 users) can we have a delivery report for those 100 users?

推荐答案

APNS 不会告诉您消息是否已成功传递.你能得到的最接近的是轮询它的 反馈服务 以查看您的应用是否已从设备上卸载.查看此 SO 帖子了解如何操作:PHP 技术来查询 APNs反馈服务器

APNS does not tell you if a message is successfully delivered. The closest you can get is poll its Feedback Service to see if your app is uninstalled from a device. Check out this SO post for an idea how: PHP technique to query the APNs Feedback Server

您可以做的是让您的 iOS 应用在收到带有 application:didReceiveRemoteNotification 的推送通知时记录一些内容,但这仅在您的应用在前台运行时才有效.

What you can do is have your iOS app record something whenever a push notification arrives with application:didReceiveRemoteNotification but that only works if your app is running in the foreground.

这篇关于如何从我们的服务器中找到发送给用户的 Apple 推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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