The resource specifier. (read-only)
SDKs
- iOS 2.0+
- macOS 10.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
var resourceSpecifier: String? { get }
Discussion
This property contains the resource specifier. Any percent-encoded characters are not unescaped. For example, in the URL http://www
, the resource specifier is //www
(everything after the colon).
Important
If the receiver does not specify a net location portion of the URL, as returned by the toll-free bridged CFURL
function CFURLCopy
, then this method returns only the path of the receiver. For example, in the URL file:///file
, the resource specifier is /file
.