Reputation: 131
I have already built OAuth with Social Networks using a UIWebView tho I would want user to login each time he tries to login. I would want to know how can I disable or delete cache and cookies loading in UIWebView Swift iOS.
Upvotes: 2
Views: 1291
Reputation: 5299
Try to This
let storage = NSHTTPCookieStorage.sharedHTTPCookieStorage()
for cookie in storage.cookies! {
storage.deleteCookie(cookie)
}
NSUserDefaults.standardUserDefaults().synchronize()
Upvotes: 1