function methods for iOS remote push and local push

Source: Internet
Author: User
briefly summarize the scenario for a remote push message 1. When the program is closed and you receive a push message, clicking on the icon invokes-(BOOL) Application: (uiapplication*) application Didfinishlaunchingwithoptions: (nsdictionary *) Launchoptions This method, then the message is obtained by launchoptions this parameter.

2. When the program is in the foreground, if you receive a message push, you will be called-(void) application: (uiapplication*) application

Didreceiveremotenotification: (nsdictionary *) UserInfo This method

3. When the program is running in the background, if you receive a message push, if you click on the message or click on the message icon, you will also be called-(void) application: (uiapplication*) application

Didreceiveremotenotification: (nsdictionary *) UserInfo This method

4. When the program is running in the background, if you receive a message push, if you click on the Desktop app icon, the Didfinishlaunchingwithoptions and Didreceiveremotenotification methods will not be called, so you cannot get the message

{

"APS": {
"Alert": "Test APNS Notification",
"Sound": "Default",
"Badge": 10
}
}

Alert is the title, sound represents the push voice, badge represents the number of the top right corner of the app icon

The ability to push locally is more powerful than a remote push. In addition to the above methods, send the format is also arbitrary, as long as you can parse it. can also store messages to local, various processing AH.

function methods for iOS remote push and local push

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.