Formalize QuickLook'ing Objects as a Protocol

Originator:widmannrobert
Number:rdar://17415881 Date Originated:
Status:Open Resolved:
Product:Developer Tools Product Version:Clang 5.1+
Classification:Enhancement Reproducible:N/A
 
Summary:
As of the iOS 8 SDK, the method -debugQuickLookObject has not been formalized in any interface or protocol.  While it could be an optional part of the NSObject protocol, it makes more sense to separate it into its own protocol.  A separate protocol would serve as a flag that a particular object supports quick looking, not only among Apple classes, but among custom 3rd party classes.  A protocol would also enable proxy objects and root objects that do not conform to the NSObject protocol to mark themselves as "quicklookable". 

As an aside, a protocol would add no overhead or extra modification work to an existing interface, and is backwards-compatible to any shipping version of a library or application compiled with Clang 5.1 and above.

Steps to Reproduce:
N/A

Expected Results:
N/A

Actual Results:
N/A

Version:
iOS 8/OS X 10.10

Notes:
An example protocol might look like:

/// The NSQuickLooking protocol defines the single method, -debugQuickLookObject, that an object needs
/// to return a visual representation of itself to the debugger.
@protocol NSQuickLooking
@required
 
/// Enables a class to return one of several common OS types for rendering visualizations of objects
/// during debugging.
///
/// Because the QuickLook System is running in the debugger, it is important that a visual
/// representation be returned as quickly as possible and cached whenever appropriate.
- (id)debugQuickLookObject;
 
@end

Configuration:
Attachments:M

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!