NSExtensionItem's attachments are cleared when userInfo is set

Originator:brian.michel
Number:rdar://18150377 Date Originated:8/27/2014
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification:Serious Bug Reproducible:Every Time
 
Summary:
If you are making your own NSExtensionItem object, setting the userInfo property after the attachments property will clear our the extension's attachments.

Steps to Reproduce:
1. Create an instance of NSExtensionItem
2. Create an instance of NSItemProvider
3. Set the value for the extension item with the provider you've created
4. Set the extension item's userInfo property

Expected Results:
The previously set attachment array should be intact. 

Actual Results:
The attachment array is nil.

Version:
iOS 8 Beta 5

Notes:
The attached sample project will throw an assertion failure when the attachments array is nil.
(sample project: http://drop.mchl.io/0t0s3h0d3U0J)

Configuration:
iPhone 5 64GB AT&T

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!