HTTP/2 protocol for IOS push reminder service (APNS) _ios

Source: Internet
Author: User

Apple recently updated their push reminder service agreement, APNs. This new version of the protocol is based on HTTP/2 and JSON, and the new protocol has improved dramatically compared to the old binary protocol.

The new APNS protocol is based on HTTP/2:

New features and Features:

JSON-based requests and responses

For each notification, if the response succeeds, a 200 identity will be returned-no more guessing whether the notification was received

The response error will be returned as a JSON character

Message length increased from 2048 bytes to 4,096 bytes

The connection status can be checked through the HTTP/2 ping frame

Support Topics

Common push certificate-development and production using the same certificate

The Old APNs binary protocol

The old binary APNs protocol is a bit peculiar, in general, the server that pushes the distribution wants to open a socket connection to the APNs gateway server and keep the connection. Under the old protocol, you will not receive any response if the server responds successfully, but if the server fails to respond (for example, using an illegal push token), the server returns an error code and closes the socket. Most importantly, you must resend all notifications that are sent after using this invalid token. Therefore, you may not be sure whether your push was successfully received by the server. Many systems use this vulnerability to intentionally send a wrong token that will result in poor system performance. Apple has a service called "feedback" that we can call this service periodically to get a list of invalid tokens. This service allows you to get all the invalid tokens lists once you've called. So, if an application has a lot of push notification providers, they will scramble for resources to poll for invalid tokens list. The more invalidtoken you have, the lower your system performance, so APNs closes the connection as soon as the error occurs.

But there are still some restrictions. Obtaining a TLS certificate is more complex, and the storage-forwarding capacity is weak, APNs only keep a notice when the device is offline, and the device will not upload information to the server after the online, Google Cloud messaging have all these features.

Given that GCM now supports iOS devices, APNs and GCM now form a competitive relationship. Let me look forward to the new features of APNs in 2016.

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.