Aurora Push Process

Source: Internet
Author: User

Stage One: Provider package the message to be sent, the purpose identity, and send it to APNs

Stage Two: APNs in the list of iOS devices for which you have registered the push service, find the iOS device that responds to the identity and send the message to the iOS device.

Phase three: The iOS device passes the message sent to the appropriate application and pops up the push notification as set.

A The first is the application registration message push.

b iOS and APNs to Devicetoken. The application accepts Devicetoken.

C The application sends Devicetoken to the Jpush service-side program.

D The server calls the Aurora SDK to send the push message and related information to Jpush.

E The Jpush service-side program sends messages to APNS.

F The APNs service sends messages to the iphone app.

    1. Apply for an Aurora account and create an app. After creation, Appkey is automatically generated to identify the app and needs to be configured in the project.
    2. Upload a push certificate. P12. The development environment displays validated, indicating that the upload was successful. The certificate ID must be consistent with the bundle identifier in the project.
    3. Import the API development package to the application project.

Unzip the SDK package and add the extracted Lib folder to the project.

The necessary framework

Cfnetwork.framework

Coretelephony.framework

Systemconfiguration.framework

Foundation.frmework

Uikit.framework

Security.framework

Xcode7 need is libz.tbd;xcode7 the following version is Libz.dylib

    1. Create a push.plist file in your project.

The channel named the download channel for the application.

App_key fills in the Appkey values that are automatically generated after the app is created on the management portal. Ensure consistency between the two sides.

5. Click Info in the project to find application requires IPhone environment Select Yes

Aps_for_production

0 indicates a developer certificate, 1 means the application is published with a production certificate

Client settings

To open remote notifications, you need to modify the app's capabilities in Xcode to turn on remote notifications.

After registering the Backgroud Modes-a Remote notifications, the notification processing function switches to the following function, and the background push code is also called in this function.

-(void) Application: (UIApplication *) application didreceiveremotenotification: (nsdictionary *) userInfo Fetchcompletionhandler: (void (^) (uibackgroundfetchresult)) Completionhandler;

+ (void) Registerdevicetoken: (NSData *) Devicetoken;

@abstract processing the Received APNs message

+ (void) Handleremotenotification: (Nsdictionary *) Remoteinfo;

-(void) Application: (UIApplication *) application

Didregisterforremotenotificationswithdevicetoken: (NSData *) Devicetoken;

What happens when your iphone receives a push message? There are a total of three possibilities:

The app runs in the foreground. There will be no display on the screen when you receive the push message, and there will be no beep, but your app delegate will receive this push message. You can add code here to process the received information.

The app is not running in the foreground. The iphone may stay on the main screen or another app is running. A hint window pops up and may be accompanied by a beep. Users can click the Close button to close this window or click the View button to open your app. If the user clicks the Close button, then your app will not process this push message.

The iphone is in the lock screen state. The same cue window pops up and accompanies the beep, but there is no close and view button in the window. The screen will automatically enter your app when it is unlocked.

Aurora Push Process

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.