Instance Method

sortedCookiesUsingDescriptors:

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

Declaration

- (NSArray<NSHTTPCookie *> *)sortedCookiesUsingDescriptors:(NSArray<NSSortDescriptor *> *)sortOrder;

Parameters

sortOrder

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 NSHTTPCookie objects.

See Also

Retrieving Cookies

cookies

The cookie storage’s cookies.

- getCookiesForTask:completionHandler:

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

- cookiesForURL:

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