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