iOS 直接向 APNS 发送请求,无需服务器 [英] iOS send request directly to APNS without server

查看:23
本文介绍了iOS 直接向 APNS 发送请求,无需服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Android 上,要发送通知,您只需要知道要通知的设备的 GCM ID.假设我的用户知道另一个用户的 id,他直接向 GCM 服务器发送一条消息,这减少了我服务器的负载.我没有构建 iOS 应用程序的经验,所以我想知道 iOS 设备是否可以使用相同的方法.如果我的用户知道另一个苹果设备的 id,他可以直接向 APNS 发送请求吗?

On Android, to send a notification all you need to know is GCM id of a device you want to notify. Assuming my user knows the id of another user, he sends a message directly to GCM server, what decreases the load on my server. I don't have experience building iOS apps, so I want to know if the same approach is possible for iOS devices. If my user knows id of another apple device, can he send a request directly to APNS?

推荐答案

尝试 NWPusher.它包含一个 iOS 演示应用程序,展示了如何从 iOS 向 iOS 发送推送通知.

Try NWPusher. It contains an iOS demo application that shows how to send push notifications from iOS to iOS.

这篇关于iOS 直接向 APNS 发送请求,无需服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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