Xcode should offer "macOS" as autocompletion for operating system

Number:rdar://742274300 Date Originated:2018-11-01
Status:Open Resolved:
Product:Xcode Product Version:11.2 (11B52)
Classification:Suggestion Reproducible:Yes
[The actual item number in Feedback Assistant is FB7422743]

In SE-0106 (implemented in Swift 3), the name "macOS" was added as an alias for "OSX" in contexts where an operating system name should appear, such as "#if os()" and "if #available()".  However, Xcode does not offer "macOS" as an autocompletion value in these contexts.  If the user types "Mac", Xcode 11 offers "macCatalyst" as an autocompletion (Xcode 10.3 offers "iosMac").

Apparently the Swift compiler will continue to accept "OSX" for backward compatibility, but after four years it would seem reasonable for Xcode to offer "macOS" as the preferred name.  (Whether Xcode should continue offering "OSX" is up to Apple.)


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!