iOS send request directly to APNS without server

2019-08-05 10:23发布

问题:

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?

回答1:

Sending a push is just a matter of posting data to apple servers.

You can do it from your server or the device. It's up to you.



回答2:

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