views:

117

answers:

1

Hello,

I need for my app to have cookies enabled in Safari and I was wondering 2 things: - How to detect if cookies are allowed or not - How to allow cookies

For the moment my googling was not really successful...

Thanks for your help :)

+1  A: 

You can't force Safari to accept cookies.

But you cat detect if they're allowed, by redirecting.

Here's how you can do:

  1. At the first page you can set a verification cookie.
  2. Forward to the second page.
  3. At the second page, check if the verification cookie is there. If it is missing, then it doesn't accept cookies.
mxg