0

Is it possible to share cookies across two different UIWebView instances. What I am trying is in an UIWebView I load a request and in the shouldStartLoadWithRequest delegate method I check whether the request type is either UIWebViewNavigationTypeLinkClicked || UIWebViewNavigationTypeFormSubmitted. If yes, I will present a new viewcontroller which has a new UIWebView added on top of it's view by passing the url captured in the shouldStartLoadWithRequest. Then I load the url passed in the new UIWebView. In this process the cookies are not passed across the UIWebViews. Can anyone tell me what is going wrong.

saikamesh
  • 4,569
  • 11
  • 53
  • 93

1 Answers1

5

all webviews within one app should have one shared cookie store. [NSHTTPCookieStorage sharedHTTPCookieStorage]

if that one isnt used by all web views inside ONE APP, something is wrong :)


as for sharing between apps: you can't. you are sandboxed!

Daij-Djan
  • 49,552
  • 17
  • 113
  • 135
  • try dumping the cookie store to see if the cookies are there ok :) >> cool script at http://stackoverflow.com/questions/771498/where-are-an-uiwebviews-cookies-stored – Daij-Djan Jan 29 '13 at 08:50