iOS APNs brand new APNs Apple 15 WWDC the dry goods at the conference

Source: Internet
Author: User

Remember 14 in the DL a big school recruit on-site interview iOS was asked APNs is Apple's push problem, at that time I said a face confused, because at that time did not really contact did the project also know a general, in short, the answer of a mess! Later went back on the internet to carefully check the article on the push, which is my first time on the iOS road contact APNs.

Push, most apps are the introduction of the three-party push, we all know what, friends, Baidu, and so on are not listed, but in some cases these push the success rate is super low, there is the debugging of developers to make people feel cumbersome, such as in the choice of push certificate, what production environment push certificate, Test environment Push Certificate, tvOS push certificate, watchOS push certificate, VoIP push certificate. It is likely that there will be chaos in exchange. But many of these problems were changed by Apple at the end of 15, the WWDC of December 15.

Specific guide to connect here https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/ Remotenotificationspg/chapters/introduction.html

Here's a metaphor for the difference between the old and new push mechanism, the original push is a bit like a UDP transmission and can't determine whether you send a message opposite to accept success in other words the success or failure of the sender will not have any monitoring, in the new push to adopt the HTTP/2 protocol, After each push message is sent, the APNS server will return a 200ok and the maximum length of the push message is also increased to 4KB here (personal understanding if there is an error, listen to the open-minded. )

Take a look at the new features of APNs:

1) Request and Response support JSON network protocol

2) APNs support status code and return error information

APNs push succeeds when Response will return status code 200, remote notification is sent successfully no longer rely on guessing!

When the APNs push fails, Response returns the ERROR message in JSON format.

3) Maximum push length increased to 4096 bytes (4Kb)

4) The "HTTP/2 PING" Heartbeat pack feature can be used to detect whether the current APNs connection is available and to maintain the current long connection.

5) Support for defining "topic" themes for different push types

6) for different push types, only one push certificate Universal push Notification Client SSL certificate is required.

Through the above text we can know that our team APNs send success rate is guaranteed, but APNs in to push to the device you want to send there is no guarantee, this has to look at the mood of the Apple server, simple point, when Apple When pay comes out, not all iphone users receive the push at the same time. Look forward to this year's WWDC Apple to improve it.

This article only to do their own study of a record, if there are errors please help to point out!

iOS APNs brand new APNs Apple 15 WWDC the dry goods at the conference

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.