A single name-value pair from the query portion of a URL.


struct URLQueryItem


Accessing the Item's Components

var name: String

The name of the query item.

var value: String?

The value for the query item.

Comparing Query Items

static func != (URLQueryItem, URLQueryItem) -> Bool

Returns a Boolean value indicating whether two values are not equal.

static func == (URLQueryItem, URLQueryItem) -> Bool

Indicates whether two query item instances are the same.

Describing a Query Item

var description: String

A textual description of the query item.

var debugDescription: String

A textual description of the query item suitable for debugging.

var customMirror: Mirror

A mirror that reflects the query item.

var hashValue: Int

The computed hash value for the query item.

Using Reference Types

class NSURLQueryItem

An object representing a single name/value pair for an item in the query portion of a URL that bridges to URLQueryItem; use NSURLQueryItem when you need reference semantics or other Foundation-specific behavior.

typealias URLQueryItem.ReferenceType

An alias for this value type's equivalent reference type.

See Also


struct URL

A value that identifies the location of a resource, such as an item on a remote server or the path to a local file.

struct URLComponents

A structure that parses URLs into and constructs URLs from their constituent parts.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software