I'm developing and iOS app that has a WKWebView
and a native login screen. On the native login screen the user can login which is done with an API call that returns a JSON object and two cookies.
What I'm trying to do is that when the call was a success and the user goes to the WKWebView
screen, they are logged in on the website that is shown as well.
The WKWebView
is already loaded so my question is how should I handle the cookies so that the user is logged in on the WKWebView
?
I've read this question & answer but that doesn't work for me. The WKWebView
isn't showing anything so I think it is blocked or in a loop.
UPDATE I'm using multiple WKWebViews, I found out that if I do the API call, then go to one WKWebView it's working fine, I'm logged in. Probably the tricky part here is that I'm using multiple WKWebViews.