1
votes

Our iOS app displays our website in a UIWebView. The webview contains an iframe to a 3rd party site. The 3rd party site requires the ability to set a cookie to store session information. This seems to work properly in iOS 5, but not in iOS 6

Does anyone know of a workaround to or correct way to handle the setting of 3rd party cookies via a webview in iOS 6?

1

1 Answers

10
votes

I had a similar problem but it turned out that it looked like the default cookieAcceptPolicy has changed. This fixed it for me:

  [NSHTTPCookieStorage sharedHTTPCookieStorage].cookieAcceptPolicy = NSHTTPCookieAcceptPolicyAlways;