An object representing a single name/value pair for an item in the query portion of a URL.
SDKs
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Foundation
Declaration
@interface NSURLQueryItem : NSObject
Overview
You use query items with the query
property of an NSURLComponents
object.
Important
The Swift overlay to the Foundation framework provides the URLQuery
structure, which bridges to the NSURLQuery
class. For more information about value types, see Working with Cocoa Frameworks in Using Swift with Cocoa and Objective-C (Swift 4.1).