We can set cookie accept policy using the NSHTTPCookieStorage class as shown below.
Here I have set to accept cookies always.
Below are the different cookie accept policies.
We can delete these cookies or set our own cookies for an URL Whenever we need based on our requirement as shown below.
I haven taken all the cookies in the storage and removing them. We can also delete cookies for a particular URL using the cookiesForURL method of NSHTTPCookieStorage as shown below.
Hope this post is useful. Feel free to comment in case of any queries.