Creates and initializes an HTTP cookie object using the provided properties.
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
The properties for the new cookie object, expressed as key value pairs.
The newly created cookie object. Returns
nil if the provided properties are invalid.
To successfully create a cookie, you must provide values for (at least) the
NSHTTPCookie keys, and either the
NSHTTPCookie key or the
See Accepting Cookies for more information on the available cookie attribute constants and the constraints imposed on the values in the dictionary.