Ionic 3 doesn't send session cookies on iOS


#1

Hi, I have a problem with iOS only, after user login on the next http request Ionic doesn’t send session cookies. My all platform are based on session cookies authentication. When I build android everything works just fine but I have a problems with iOS.

My Ionic info:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.4
    Cordova Platforms  : android 6.3.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2 
    ios-sim    : 6.1.2 
    Node       : v8.9.0
    npm        : 5.5.1 
    OS         : macOS Sierra
    Xcode      : Xcode 9.2 Build version 9C40b

Does anyone can help me, it’s urgent?

Thanks in advance

Update: withCredentials: true doesn’t help, I tried.


#2

You are most likely using the WKWebview.
It has an issue with cookies, see here:
–> https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/22


#3

I tried this solution, downgrade to UIWebView, but when I add in config.xml

<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />

of uninstall plugin cordova-plugin-ionic-webview, I can’t start application. Splash screen doesn’t turn off.