In my application i am maintaining session in serverside and it is valid for 20 days. The problem is when the app gets killed, sometimes the cookies got deleted so its asking to login again. How can I catch the event when the app gets killed so that i can save that cookie.
Asked
Active
Viewed 668 times
1
-
How are you managing cookie storage? – Marcus Adams Jun 03 '13 at 18:41
-
Actually i am using AFNetworking in my project it will manage the cookies – thavasidurai Jun 03 '13 at 18:45
-
AFNetworking stores cookies for the lifetime of the application (see http://stackoverflow.com/a/8627013/1445366). How do you know they're getting deleted? – Aaron Brager Jun 03 '13 at 20:27
-
If the cookies are being deleted, you're deleting them from `[NSHTTPCookieStorage sharedHTTPCookieStorage]`. – Aaron Brager Jun 03 '13 at 20:29
-
@AaronBrager i did not delete the cookies – thavasidurai Jun 03 '13 at 20:35
-
@AaronBrager some times application asking me to login again when application gets crashed – thavasidurai Jun 03 '13 at 20:36
-
Show your login code. What else might be different? – Aaron Brager Jun 03 '13 at 21:07