Questions about the iOS Push notification response

Source: Internet
Author: User

When the server is delivering notifications to the client, the client has several things:

1. The application is turned off and the notification is displayed, either by tapping the app icon or by clicking the notification, the system launches the app and invokes its proxy method (application:didfinishlaunchingwithoptions:), Deliver notifications via Launchoptions.

if (launchoptions) {

nsdictionary* Pushnotificationkey = [Launchoptions Objectforkey:uiapplicationlaunchoptionsremotenotificationkey];

if (Pushnotificationkey) {

Define your own way of handling this.

}

}

2. The application is in a background state, when the notification is displayed. If you click on the notification, the app calls Application:didreceiveremotenotification: Method or Application:didreceivelocalnotification: method, if you click the Apply icon , the method above is not automatically executed.

3. The application is in a foreground state when the notification is not displayed. the application calls directly (because the app is in the foreground) its proxy function Application:didreceiveremotenotification: method or Application:didreceivelocalnotification: Method that conveys the notification object for the response.

Questions about the iOS Push notification response

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.