1

I am using WKWebView on my app where user can login, but I have an issue. The user credentials are not saved so the user has to login every time he starts the app. I am using sessions to keep user logged in Javascript on my website, but the sessions are not working on WKWebView.

I tried: request.httpShouldHandleCookies = true but it is not working.

Besart
  • 309
  • 1
  • 4
  • 22

1 Answers1

0

You options:

  1. You can either pass an auth token, like many do
  2. Use WKProcessPool: WKWebview iOS (swift) : Keep session connected after app closed
  3. Another possible option is to share sessions with Safari using SFSafariViewController (but then you can't access the content of the page)
thedp
  • 8,350
  • 16
  • 53
  • 95