Instance Method


Returns all of the cookie storage’s cookies, sorted according to a given set of sort descriptors.


func sortedCookies(using sortOrder: [NSSortDescriptor]) -> [HTTPCookie]



The sort descriptors to use for sorting, as an array of NSSortDescriptor objects.

Return Value

The cookie storage’s cookies, sorted according to sortOrder, as an array of HTTPCookie objects.

See Also

Retrieving Cookies

var cookies: [HTTPCookie]?

The cookie storage’s cookies.

func getCookiesFor(URLSessionTask, completionHandler: ([HTTPCookie]?) -> Void)

Fetches cookies relevant to the specified task and passes them to the completion handler.

func cookies(for: URL) -> [HTTPCookie]?

Returns all the cookie storage’s cookies that are sent to a specified URL.