Instance Property

scheme

The scheme URL component, or nil if not present.

Declaration

var scheme: String? { get set }

Discussion

For example, in the URL http://www.example.com/index.html, the scheme is http.

If you attempt to set the scheme to an invalid scheme string, this class throws an exception.

See Also

Accessing Components in Native Format

var fragment: String?

The fragment URL component (the part after a # symbol), or nil if not present.

var host: String?

The host URL subcomponent, or nil if not present.

var password: String?

The password URL subcomponent, or nil if not present.

var path: String?

The path URL component, or nil if not present.

var port: NSNumber?

The port number URL component, or nil if not present.

var query: String?

The query URL component as a string, or nil if not present.

var queryItems: [URLQueryItem]?

The query URL component as an array of name/value pairs.

var user: String?

The username URL subcomponent, or nil if not present.