I've got a working Cordova based app, currently with relatively large user base. No problem so far except this one which Apple won't fix. It's OK though, we created ugly workarounds just to keep moving...
But, here comes iOS 13 (beta 8) and we learn that WebKit in this release doesn't send cookies back to server at all. Not once, not on the start - never. The release of iOS 13 is few weeks ahead and I simply don't know what are we to do when all users upgrade to it and our app stops working...
We use cookies for session management, nothing fancy, classical old Jetty based back end. The workaround I did for the first-time-use problem is to append jsessionid parameter to URL on each request and then strip that on server side, convert to cookie and send further down the chain. I don't know if it is safe to use it all the time assuming that WebKit stops sending back cookies. Here are some related bugs pending but it's unlikely Apple will even look at them:
Anybody experiencing similar problems? How do you deal with it?
I had the same problem with my ionic 3 app. I found workarounds using :
https://github.com/sneas/ionic-native-http-connection-backend
https://ionicframework.com/docs/native/http/#installation
By replacing the API calls from rxjs with the native objective C http call, the cookie persist well from the http response of the backend. Maybe, you can try with this ...
Add this plugin https://github.com/oracle/cordova-plugin-wkwebview-file-xhr, it intercept XHR requests and handle them by this plugin. It works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With