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.