iOS system push principle

Source: Internet
Author: User

iOS push general principles such as

1.Provider: Is the server that provides push for the specified iOS device application (if The iOS device application is a client, then Provider can be understood as a service-side [initiator of the message] ]);

2,APNS:Apple push Notification service[Apple message Push server ];

3, theiPhone: Used to receive APNs issued by the news;

4.Client app: Anapp on an iOS device that receives an iphone delivery APNs message to the final responder of a client app[message being developed ];

Can be divided into three stages:

Phase one:provider[service side ] to send the message, the purpose of the iOS device identification Packaging, sent to APNS;

Stage Two: APNs in the list of iOS devices for which youhave registered the push service, look for an iOS device with the appropriate identity and send the message to the iOS device;

Phase three: TheiOS device passes the message sent to the corresponding application and pops up the push notification as set.

specific process, see

1,[Client APP] Registration message push;

2,[client app] and [APNS Service] to Devicetoken, client app receive Devicetoken;

3,[Client App] Send devicetoken to [Provider]push server program;

4, when the push server program satisfies the sending message condition,[Provider] sends the message to [APNS service];

5. [APNS Service] sends the message to the [Client App].

Some basic concepts on iOS devices:

A unique identifier for the Udid:ios device, each iOS device has a unique encoding, which we call the identification code, also known as UDID (unique Device Identifier).

Bundle ID: (bundle Identifier) is a unique identifier for an iOS app and is the only correspondence between apps and Bundle IDs.

Note: Once the app is created, the Bundle ID will not be modifiable, and if it has to be modified to create only one new app, the app ID, app key and app secret will be reassigned, and older users will not be able to receive a push for the new Bundle ID.

Device token: Equipment tokens, user identities

1. Get Devicetoken:

1> Client to Apple service APNs, send device Udid and English bundle Identifier.
2> by Apple server encryption generates a Devicetoken
3> sends the current user's Devicetoken (user ID) to their application's server
4> own server, will get the Devicetoken, save

!!! Device is subject to change

    1. In one device, device tokens are system-level, and the device tokens obtained by different apps are the same. If my phone has Angry Bird and Evernote installed, the two apps get the same device token.

    2. Device tokens are not changed as a result of a single app update. If my IPhone upgrades the latest version of Angry Birds, this will not cause my device token to change.

    3. If my iPhone recovers data from backup, device tokens will not change.

    4. When users erase the IPhone's data, it means they want to get out of the phone, such as selling or sending people. In order to protect privacy, device token will change.

2. Get the deviceToken后 push message to the device

5> need to push, send the message and Devicetoken together to APNs, Apple Server, and then devicetoken to find the user, and send the message to the user

Reference article:

Http://www.cnblogs.com/fendou0320/p/6526955.html

http://blog.csdn.net/u012449749/article/details/50542285

iOS system push principle

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.