send notification like push notification without APNS server in ios,

2.6k views Asked by At

I want to send push notification without any APNS server and device token,like android there is NO local and push notifications but they can send device to device with out google permissions.

1

There are 1 answers

2
Fabian Guerra Soto On BEST ANSWER

You can NOT send a push notification without using APNs. Why? first you need to understand how the technology works:

You need a certificate for a handshake.

You need a device token to be identified by APNs.

  1. In your app, you have to register to APNs.
  2. The app requests the certificate from APNs (handshake).
  3. The server sends back its certificate.
  4. The app will establish a connection to the server and send the PN certificate to the APN server.
  5. The server will validate that you are a trusted app.
  6. The app requests to create a token.
  7. The server creates a token and sends it back.
  8. In your app you save the token (to do e.g. push notifications to a specific user instead of a broadcast).
  9. End.

So, as you see, you need to establish a trusted connection, the APNs is responsible for creating a token to identify your device within the network, and will be responsible for sending notifications.

For more info you could see: Apple PNs