I'm facing a problem with phonegap cookie based authentication: After i force the iPhone to close my app (double click on the physical button and close), i lose the cookie that i established with the server. How can i avoid it? Is there some configuration? Or an alternative way for it?
It works normally when i run it for the first time and the error just happens when i force close the app. It works normally on android.
I'm using: iPhone - iOS 6.1 and Cordova 2.5
Thanks
I would advice you to abandon cookie solution and instead to switch to localStorage solution.
iOS 6.X has few problems with cookie handling and even if Apple fix all problems some people will still use older version thus making your app unusable on older platforms. Cookies are archaic technology and there are some talks iOS will loose the support in some future versions.
On the other hand localStorage is fully supported on HTML5 browsers.
You can go even further that that. There's a great js framework called persistance.js. It will automatically use best storage option for your device and there are 4 different kinds of storage solution.
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