A policy constant that determines when cookies should be accepted.
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+Beta
- 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
NSHTTPCookie. You can change it to any of the constants defined in the
NSHTTPCookie enumerated type.
If you want more direct control over what cookies are accepted, set this value to
NSHTTPCookie and then use the
cookies methods to extract cookies from the URL response object yourself.