Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

KumarMac

macrumors newbie
Original poster
Feb 6, 2013
1
0
My Application is a Mobile Hybrid app I mean Phonegap app. I am trying to persistent cookie to avoid login every time, say for example 7 days.

To achieve this I am making an AJAX call to the server then server will set the cookie for 7 days, but I am loosing the cookie when I restart the Phone this is happening both in Android and IOS in Android I am using the below solution.

Code:
onCreate()
    CookieSyncManager.createInstance(this);

onResume()
    CookieSyncManager.getInstance().startSync();

onPause()
    CookieSyncManager.getInstance().stopSync();

Is there any similar solution in IOS. I am not sure how to achieve this in IOS. Appreciate your help.
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.