Invalidating session before iPhone application quits
Posted
by tartox
on Stack Overflow
See other posts from Stack Overflow
or by tartox
Published on 2010-04-07T08:38:16Z
Indexed on
2010/04/07
8:43 UTC
Read the original article
Hit count: 293
Hello
I would like to tell the server to invalidate an ongoing session when the user quits the iPhone application.
In the app delegate, I send a request to the server in the (void)applicationWillTerminate:(UIApplication *)application
method. I am not waiting for a server answer, I just want to send the request and quit.
However I cant see any packet leaving the application. The same code in another place works fine.
Session has a limited duration anyway and the server will invalidate it after a while, but I would prefer to do it nicely when leaving application.
Is it normal that no NSURLConnection can be established from the applicationWillTerminate method ?
Thank you.
© Stack Overflow or respective owner