If user killed application manually, after that application receive push notification, how can i increase the badge number on application icon
func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject], fetchCompletionHandler completionHandler: (UIBackgroundFetchResult) -> Void) {
application.applicationIconBadgeNumber = 1
}
"contentAvailable : 1"
Could you help me please, Thank you very much.
Normal APNS payload is as following:
{
"aps":{
"alert": "Hello, world!",
"sound": "default"
"badge": "2"
}
}
And silent APNS push payload is as following:
aps {
content-available: 1
alert: {...}
}
When a silent push notification reaches device, user does not know anything about the notification. But your app gets the notification and app will be given some time to download new content and present it to the user.
If you kill App, user can't get any alert when a silent push notification reaches device! So check your payload for this!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.