UIActivityItemProvider's item() return value should be nullable

Originator:fluidsonic
Number:rdar://21669234 Date Originated:2015-07-03
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 7 Beta 2
Classification:Other Bug Reproducible:Always
 
Summary:
The code which retrieves the actual data inside item() may fail, e.g. due to network error when downloading an image.

When the retrieval of the data fails iOS 8 SDK and earlier allowed returning nil to not provide an item (as there is none). With iOS 9 SDK the function must now return some instance of a class which is definitely not supported by any UIActivity (or by any app extension) to achieve the same result.

Steps to Reproduce:
1. Implement the item() method to retrieve some data which is loaded of the network.
2. Think about how to handle the error case when the data could not be retrieved.

Expected Results:
item() return value should be nullable.

Actual Results:
item() return value is non-nullable.

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!