Apple 向特定用户推送通知
据我了解 APN,我只能将它们发送到应用程序,而不是使用我的应用程序的特定用户。
有没有办法只向使用我的应用程序的特定用户发送 APN?我想不出有什么办法可以做到这一点...
Greetz
as far as I understand APN's I can only send them to the app not a specific user that uses my app.
Is there a way of sending APN's only to specific users that use my app? I can't think of a way of doing this...
Greetz
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
APNS 不是广播媒体。 正如文档中所述:
当您从服务器发送通知时,参数之一是设备 ID。
APNS is not a broadcast medium. As it says in the documentation:
When you send a notification from the server, one of the paramters is the device ID.
Apple 的推送通知始终发送给特定的“用户”(特定设备是 iphone、ipad)。
当您想要使用 APN 时,您要做的就是注册推送通知的应用程序。然后,您将获得一个将用户设备链接到通知服务的令牌。然后,您可以使用此令牌将通知“推送”到 APN,APN 又会向该设备发送通知。通知由“提供商”推送。
以下是苹果关于此事的文档: Apple 推送通知
查找“注册远程通知”进行注册该设备
和“处理本地和远程通知”来处理传入的通知。
在此处阅读如何发送通知:提供商
Apple's Push Notifications are always sent to specific 'users' (a specific device being an iphone, ipad)
What you do when you want to use APN is register the application for push notifications. Then you get a token that links the user's device to the notification service. You then use this token to 'push notifications' to APN which will in turn send a notification to that device. Notifications are pushed by 'Providers'.
Here's apple's documentation on the matter: Apple Push Notifications
Look up 'Registering for Remote Notifications' to register the device
and 'Handling Local and Remote Notifications' to handle the incoming notifications.
Read up on how to send notifications here: Providers
这是可能的。我使用 Easy APNS,在
newMessage()
中您可以指定用户的 PID(保存在 MySQL 数据库中)。看看 http://www.easyapns.com/
It is possible. I use Easy APNS and in
newMessage()
you can specify the PID (saved in a MySQL database) of the user.Have a look at http://www.easyapns.com/