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.


class NSURLQueryItem : NSObject


You use query items with the queryItems property of an NSURLComponents object.


Creating a Query Item

init(name: String, value: String?)

Initializes a newly allocated query item with the specified name and value.

Reading a Query Item’s Name and Value

var name: String

The name of the query item.

var value: String?

The value for the query item.


Inherits From

See Also

Using Reference Types

typealias URLQueryItem.ReferenceType

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

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