How to delete UIWebView cookies?
I load a custom site into a WebView inside my application. The user is logged into the site using his credentials stored on an earlier screen in the app, on WebView load and on succesfull authentication a message "Hello User1" is displayed in the WebView. However, if I navigate back into the app, change credentials to that of User2 and proceed to the WebView, it continues to display "Hello User1" instead of "Hello User2".
I suppose this is a cookie issue. I'm not doing any cookie management but due to the above issue, i would like to know how to delete any previous cookies stored BEFORE the WebView loads for each user. The app works fine with User2 creds if restarted but changing creds during the instance of the app causes the problem. Please help!
|