UTTypeCopyPreferredTagWithClass doesn't returns an array of CFString

Number:rdar://7437212 Date Originated:9-Nov-2019 11:23 PM
Status:Open Resolved:
Product:macOS Product Version:
Classification:Bug Reproducible:Yes
I could not find `CoreServices` as an area to file this problem so I chose `Foundation` instead.

## Problem

The latest documentation says `UTTypeCopyPreferredTagWithClass` returns 

> An array of tags (as CFStrings), or NULL if there was no translation available to convert the uniform type identifier to the specified class.

According to [the document](https://developer.apple.com/documentation/coreservices/1442744-uttypecopypreferredtagwithclass).
(And I attach the archive just in case: https://web.archive.org/web/20190621082901/https://developer.apple.com/documentation/coreservices/1442744-uttypecopypreferredtagwithclass)

However its method signature is `Unmanaged<CFString>?` and actually it doesn't return *an array of CFStrings*.
I tried to advance the pointer but it didn't return anything but raised EXC_BAD_ACCESS exception.

I guess the problem is due to rather the documentation than the actual behavior but this contradiction is confusing so I'd like you to fix this problem (of course or documentation).


The actual issue number is FB7437212 but it seems like Open Rader doesn't accept new Feedback Assistant's bug tracking number so I removed the first non-digit letters FB and set the reset digits as the number of the issue.

By rito.0305 at Nov. 9, 2019, 2:29 p.m. (reply...)

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!