Search code examples
iosiphonedatabase-designios7apple-push-notifications

Apple PushNotification : Need Server Side functionality Guide


I am working on an Incident management app & already have

  • The backend services ready(Example: user registration & Incident ticket details.) .
  • I am planning to implement the Push notification, so that any incident activity (like new, updated, closed) should be sent to user as notification. As soon as user taps the incident notification, the corresponding incident details is fetched based on the incident iD passed in the PayLoad of the PushNotification.

I have fare knowledge of setting up Push Notification (as i have done some sample app with local sever, hardcoding the device UUID in server code), but still I feel that I need an expert advice on the following doubtful points:

  • Do I need to modify the registration service (at present taking only userID/Password) to take that extra device (UUID) information.
  • Do I need to store the mapping of deviceID with the registered user ID in database (in some specific table for pushNotification) , so as to use this deivceID whenever I need to send this user a notification.
  • Suppose there are more than one people to be notified for some incident, how the server should be sending notification to both people, serially or a kind of broadcast
  • How do I invoke my push Notification server on every update on any incident.

If the experts feel that the question is more subjective & off the topic & doesn't involve any programming constructs, please comment on the same.


Solution

  • I answered your questions:

    Do I need to modify the registration service (at present taking only userID/Password) to take that extra device (UUID) information.

    You need to device token(required), userid(option), password(option) pass these thing to server. On the server side you have to write php/python script for getting these parameter and store them in database.

    Do I need to store the mapping of deviceID with the registered user ID in database (in some specific table for pushNotification) , so as to use this deviceID whenever I need to send this user a notification.

    If you want yo send push notification more than one devices than you have to store user device token,id, password in the database via a scripting langauge.

    Suppose there are more than one people to be notified for some incident, how the server should be sending notification to both people, serially or a kind of broadcast

    How do I invoke my push Notification server on every update on any incident.

    If you have to send notification more than one people than you have to write SQL query for fetching data(device token n id) of those people whom you have to send notification. you have to call.