how we can maintain push notification for hundreds of devices? do we need to maintain a database on server or apple will maintain this,we just need to send payload.also i'm confusing in this matter that how do i cancel already sent payload...does someone knows about it?

Accepted Answer

You need to maintain your own database. The payload that you send to Apple includes the device token of the iphone you are sending the message to. Your table could contain as simple as an id for the user (auto-generated id, or email, or whatever you need), mapped to the iphone deviceToken, along with other columns and tables that you need for your book-keeping. The device token can be stored as String for simplicity, but it's really a 32-byte BLOB.

Once you send a payload, you cannot cancel or check its status. Once you send it, it's out of your hands.

Written by notnoop
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the community.
It is licensed under cc-wiki