Enhancement Request: Make KVO enhancements in iOS11/macOS 10.13 available in Objective-C

Originator:armadsen
Number:rdar://32769078 Date Originated:06/14/2017
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 9.0 beta (9M136h)
Classification: Reproducible:Always
 
Summary:
Foundation in iOS11 and macOS 10.13 provides some very nice enhancements to Key Value Observing, including block/closure based observers, easy unregistration, the NSKeyValueObservedChange type, etc. Unfortunately, it seems these enhancements are only available when using Swift, despite KVO requiring the use of the Objective-C runtime. Most if not all of these changes would be very useful in Objective-C as well, so I'm requested that they be made available in Objective-C.

Steps to Reproduce:
Try to use new foo.observe() { } style API in Objective-C

Expected Results:
Block based KVO API is available in Objective-C.

Observed Results:
Block based KVO API is only available in Swift.

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!