A policy constant that determines when cookies should be accepted.
- iOS 7.0+
- macOS 10.9+
- tvOS 9.0+
- watchOS 2.0+
This property determines the cookie accept policy for all tasks within sessions based on this configuration.
The default value is
HTTPCookie. You can change it to any of the constants defined in the
HTTPCookie enumerated type.
If you want more direct control over what cookies are accepted, set this value to
HTTPCookie and then use the
cookies(with methods to extract cookies from the URL response object yourself.