App displays badge from remote notification when UIUserNotificationTypeBadge is not requested
| Originator: | Christian.Lobach | ||
| Number: | rdar://18896606 | Date Originated: | 06-Nov-2014 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 7.1.2, 8.1 |
| Classification: | UI | Reproducible: | Always |
Summary:
As a developer, when I register for the user notification types UIUserNotificationTypeAlert and UIUserNotificationTypeSound (and NOT UIUserNotificationTypeBadge), and I receive a remote notification containing a badge value, the app icon displays the badge number from in the remote notification.
The documentation under https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW1 says: "The system does not badge icons, display alert messages, or play alert sounds if any of these notification types are not enabled for your app, even if they are specified in the notification payload"
This has been tested under iOS 7 and iOS 8 with the corresponding API (see attached sample project).
Steps to Reproduce:
1. Open attached sample project
2. set a valid provisioning profile and bundle identifier that are configured to receive push notifications
3. build and run on a device
4. accept receiving notifications
5. background the app
6. send a push notification with the following payload:
{
"aps":{
"alert":"Test",
"sound":"default",
"badge":666
}
}
Expected Results:
There is no badge on the app icon
Actual Results:
There is a badge on the app icon, displaying the number "666"
Version:
iOS 7.1.2 AND iOS 8.1
Notes:
Configuration:
iPhone 4 16GB AND iPhone 6 64GB
Attachments:
'badgetest.zip' was successfully uploaded.
http://cl.ly/3V0q3S390z3S
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!