Using action-loc-key = null in a push fails to show single OK button

Originator:jszumski
Number:rdar://10308591 Date Originated:18-Oct-2011 10:11 PM
Status:Closed Resolved:Behaves correctly
Product:iPhone SDK Product Version:5.0
Classification:UI/Usability Reproducible:Always
 
Summary: When sending a push notification to a device running iOS 5.0 with action-loc-key = null, the OS displays an alert view containing two buttons "Close" and "Launch" instead of the expected "OK".  On iOS 4.0, the same push notification only displays a single button "OK".

Steps to Reproduce:
1) The app must NOT be in the foreground (it should be in the background or not running)
2) Set the app to display the "Alert" style push notification view in Settings -> Notifications
3) Send a push containing the following JSON: {"aps":{"alert":{"body":"This is a push notification.","action-loc-key":null}}}
4) Observe an alert view containing two buttons: "Close" and "Launch"

Expected Results: An alert view should display only one button "OK".

Actual Results: An alert view shows two buttons: "Close" and "Launch".

Regression: The incorrect two-button view shows in iOS 5.0.  The correct single-button view shows in iOS 4.2.1 running on another test device.

Notes: None.

Comments

Issue still present in iOS6

I experience this issue on iOS >= 6 too and I'm not able to display a PN alert with one single button.


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!