I use UIWebView that users login in accounts. Users may login with facebook account. He is click button Facebook and opens UIWebView. After login UIWebView close and users may use your personal account. But when I close my app and open it again users not login. UIWebView not save cookies. I found this answer https://stackoverflow.com/a/26006163 And added this code in my app. This only works temporarily. I close my app and open through hours it again users not login. I tried to change this line
[cookieProperties setObject:[[NSDate date] dateByAddingTimeInterval:2629743] forKey:NSHTTPCookieExpires];
to this
[cookieProperties setObject:[[NSDate date] dateByAddingTimeInterval:100*12*30*60*60] forKey:NSHTTPCookieExpires];
But it did not help me.