Apple Notification Push Service (APNS) summary of some key features
Source: Internet
Author: User
<span id="Label3"></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">Some time ago, it was important to study Apns's documentation, to record some of the key points and to understand the rules for understanding Apns.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">1. If APNs attempts to deliver a notification and the device is offline, the notification are stored for a limited period o F time, and delivered to the device when it becomes available.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">If the User's phone is not on the line, there may be no signal or shutdown, APNs will store and forward, and so on when the user online and then send</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">2.Only one recent notification for a particular application is Stored. If multiple notifications is sent and the device is offline, each new notification causes the prior notification Discarded. This behavior of keeping only the newest notification are referred to as coalescing notifications.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">If the user is not on the line, the notification is merged and only the latest one is Retained. If you send the user two notifications, but the user feedback that only received one, then it is likely that the user was not on the line, Apns's merge strategy takes effect, only keep the latest</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">3.If the device remains offline for a long time, any notifications this were being stored for it is discarded</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">4.The maximum size allowed for a notification payload are-bytes; Apple Push Notification Service refuses any Notification that exceeds this limit.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">This is important, payload, which is the last JSON generated, not more than 256 bytes. If it is exceeded, it is recommended to remove some unnecessary parameters, the alert, that is, the number of words to reduce the message</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">5.don ' t repeatedly open and close connections. APNs treats rapid connection and disconnection as a denial-of-service attack.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">6.IF you send a notification That's accepted by APNs and nothing is Returned.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">Send successful wood to return, only send failed to return</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">7.IF you send a notification that's malformed or otherwise unintelligible, APNs returns an Error-response packet and Clos Es the Connection. Any notifications this sent after the malformed notification using the same connection is discarded, and must be Rese Nt.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">This is very important, if there is error-response, then this notice will need to be re-sent. There are a lot of Open-source libraries, in the Apple notifications are not detected error-response, if you accidentally use, then users are likely to feedback "why not notice ah"</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">8.THE notification identifier in the "error response indicates the last notification this was successfully sent (actual Back is the ID of the notification that the error occurred). Any notifications your sent after it has been discarded and must be resent. When you receive the This status code, the stop using this connection and open a new Connection.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">This is a supplement to the previous one, if something goes wrong, you need to close the current connection and reconnect Again. The notification ID that is returned in Error-response can help us find out which one is wrong so we know which ones need to be re-sent.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">9.When A push notification cannot is delivered because the intended app does not exist on the device, the feedback service Adds that Device's token to its list.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">Apns's Feedback Service Returns the token--device_token of those devices that have been uninstalled. Store these tokens, next time you don't have to send them, you can save a bit of Resources. Note that the feedback interface reads once, APNs clears its list, and the next time it reads, it returns the newly generated device_token between the two reads.</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-family: Helvetica, Tahoma, Arial, sans-serif; font-size: 14px; line-height: 25.2000007629395px; white-space: normal; background-color: rgb(255, 255, 255);">It is only by making this clear that we understand the rules of Apple push and know some of the shortcomings of our Push. With these rules in my own right, i encapsulated a Java class library, already open source and put it on github, and the next article provides details.</p></p><p><p><br></p></p><p><p> Apple notification Push Service (APNS) summary of some key features </p> </p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.