NSFetchedResultsController objectAtIndexPath should return optional

Originator:Maxlitteral
Number:rdar://22774362 Date Originated:9-20-15
Status:Open Resolved:No
Product:iOS SDK Product Version:9.0
Classification:Crash/hang/loss Reproducible:Always
 
Summary:
objectAtIndexPath returns anyObject, but not optional. when passing in a index path that has no object this crashes the app and is unsafe. Instead it should return a optional and not crash the app in Swift.

Steps to Reproduce:
NA

Expected Results:
NSFetchedResultsController. objectAtIndexPath to return anyObject? and not crash

Actual Results:
objectAtIndexPath will crash the app if a index path is passed in that has no object there

Version:
iOS 9.0

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!