Using an iOS push

Source: Internet
Author: User

1. Process: The app is registered with a push server, and a push server returns ClientID;

The app will send the ClientID to the app's server;

The app server sends a message (containing the app's ClientID) to a push server;

A push server to determine if the app is online, and if the Internet, a push server sends the message to the app;

If not on the line, a push server sends the message to Apple, using Apple APNs (activating the app to make the app online), and after the app is online, a push server pushes the message to the app.

App is not online: 1) app in the background: After getting the Apple APNs push notification, the screen does not lock, click the message to launch the application, not through the Appdidfinishlaunch function.

If you lock the screen, unlock the click Message and launch the app without Appdidfinishlaunch. (or manually click Apply)

2) app is not running: After getting the Apple APNs push notification, the screen is not locked, click the message to launch the app, after the Appdidfinishlaunch function.

If you lock the screen, unlock the click Message, launch the app, and also go through appdidfinishlaunch. (or manually click Start application)

2. Handling apps not online: using Apple APNs

Apple Appid,appid needs to support apple push function; Create an Apple app push to develop an SSL certificate, manually generate Provisionfile, download provisionfile, use the file in Xcode code sign, and register a remote push request in the application Appdidfinishlaunch function. Get Devicetoken, submit device token to a push server (if the program has been run, when the app is registered to a push server, request ClientID, will automatically send the previous device token to a push server, Complete AppID binding to device token), app can receive Apple push message (specific processing can be processed in callback method, or in application Didlaunch)

3. In order to use a push, you need to apply for a push AppID, submit the app bundle ID, the. p12 format APNs certificate and password, and then get Appid,appkey,appsecret and so on.

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.