UIAlertAction initializer takes optional string when it should be non-optional

Originator:bjtitus
Number:rdar://22609978 Date Originated:September 8, 2015
Status:Open Resolved:
Product:iOS SDK Product Version:8.4 (12H141)
Classification:UI/Usability Reproducible:Always
 
Summary:
The UIAlertAction documentation states that the title parameter in its initializer "must not be nil". However, this parameter is marked as optional when it could be marked as non-optional to enforce this requirement at compile time.

Steps to Reproduce:
Pass nil title to UIAlertAction initializer
Application Crashes with no compiler error despite requirement of non-nil titles.

Expected Results:
UIAlertAction initializer's title parameter should not be optional to enforce this requirement.

Actual Results:
UIAlertAction initializer allows title to be nil, causing a crash.

Notes:
This does NOT appear to be fixed in the iOS 9 SDK according to the headers.

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!