Documentation of Swift Foundation URL structure has incorrect availability annotation

Originator:argentumko
Number:rdar://30108952 Date Originated:20-Jan-2017
Status:Closed Resolved:
Product:Documentation Product Version:
Classification:UI/Usability Reproducible:Always
 
Summary:
Documentation for Swift Foundation library URL structure (available at https://developer.apple.com/reference/foundation/url) incorrectly states that this struct and many of its methods and properties are available only on iOS 10.0+, macOS 10.12+, tvOS 10.0+ and watchOS 3.0+. This is incorrect and grossly misleading. The structure is available in Swift 3 for all OS versions supported by it (as part of the Swift runtime libraries shipped with any Swift app), and availability of many methods and properties should reflect their respective NSURL counterparts.

Steps to Reproduce:
1. Look in documentation at https://developer.apple.com/reference/foundation/url – for example, looking for the "path" property (many more properties and methods are affected).

Expected Results:
Documentation correctly states that URL structure is available in iOS 8.0+, macOS 10.10+, tvOS 9.0+, watchOS 2.0+ (minimum versions for Swift) – just like NSURL class. Documentation of properties and methods like "path", which have NSURL counterparts introduced long before iOS 8, also states the same availability.

Actual Results:
Most properties of URL struct have availability of iOS 10.0+, macOS 10.12+, tvOS 10.0+ and watchOS 3.0+, which is very confusing.

Notes:
The "workaround" is to consult NSURL documentation to check availability.

Ironically, some methods/properties *actually* introduced in or after iOS 8.0, macOS 10.10, etc., e.g. "hasDirectoryPath", are marked respectively in URL struct documentation. This is funny: how come a property became available earlier than the struct itself?

Comments

Vlas Voloshin

Looks like this issue has been fixed in the latest version of documentation. Thanks!

By argentumko at Oct. 1, 2018, 12:25 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!