Question

I am developing an application in which I want to use push notification service. I have a server, now I want to know that

  • How do I handle multiple devices?

  • Is there a unique device id/name for every iphone?

  • Suppose I want to delete request for a specific device token, so how do I handle multiple users?

  • Is there a way I can generate unique name for every device through application?

Was it helpful?

Solution

You should really read the APNS documentation, this is all explained in depth there.

The short answer is that when you launch an app on the phone it requests a push notification key from the OS. You then take that key and send it back to your server. Your server uses that key when it sends a push via Apple's servers to indicate the devices to send the push out to.

The service just gives you a token. If you want accounts or device names you need to come up with them and store them with the credentials on your server.

You handle multiple users by same way you handle single users, you send message with the appropriate key to the service.

As for deleting a request, you can't. It is like a text message, there may be some latency before hits the device, but the moment you commit the push it could be delivered instantly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top