D
D
DKostin852015-07-27 14:32:28
Push technologies
DKostin85, 2015-07-27 14:32:28

How to implement sending push messages from your own CMS?

Good afternoon! At the moment we are going to implement the scheme in the CMS according to the algorithm described below, but there is no real experience in mailing. Will the mailing list work according to this algorithm? Will we be able to add any field we are interested in to the push message, in addition to the text?
The process for sending a push notification for the iOS system is as follows:
1. The application registers with APNS (Apple push notification service) to obtain a unique device token.
2. APNS issues a device token to the application.
3. The application sends the CMS device token.
4. CMS sends push notification to APNS. In fact, we can add any field of interest to us in addition to the notification text.
5. After the notification is sent, we receive the APNS message acceptance status from APNS:
a. Message received by APNS;
b. The message was not accepted by APNS, the MU User declined the ability to accept push notifications for our Application (this option is available for the iOS platform).
6. If the message is received by the APNS, then the APNS delivers the push notification to the user's device.
7. When a notification delivery event occurs and the User takes the appropriate action, one of the following events is triggered:
a. didReceiveRemoteNotification - if the Application is running in the foreground or background;
b. didFinishLaunchingWithOptions passing the key UIApplicationLaunchOptionsRemoteNotificationKey - if the Application is not running;
8. Both of the above events contain a collection of type NSDictionary, the collection contains the generated push notification fields.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
overfl0w, 2015-08-30
@overfl0w

Yes, you can send arbitrary data along with the message. The main thing is that the length of the message transmitted by APNS does not exceed 2 kb.
The algorithm will work (this is, in fact, the standard algorithm for sending push notifications). The only thing to pay attention to is point 5: APNS does not transmit the delivery status of the message. APNS provides a Feedback Service, with which once a day (as recommended by Apple) you can request a list of tokens that are no longer possible to deliver (if the user has disabled push messages for your application). If the user re-enables push messages, this token may become valid again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question