Initializes an HTTP cookie object with the given cookie properties.
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The properties for the new cookie object, expressed as key-value pairs.
A new cookie object, with the given properies.
This initializer 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.