I'm developing an app and I have embedded facebook login in to that. I want to logout the user, when user closing the application after enter to the background, by pressing (-) not the home button. So I planned to calling the logout methods in the delegate method which called when application closing. I was thought that it was ApplicationWillTerminate
method. But it is not working. Does anyone know what is the delegate method or where should I called logout methods ?
Asked
Active
Viewed 1,705 times
1

enadun
- 3,107
- 3
- 31
- 34
-
1We don't get one. See http://stackoverflow.com/questions/7417003/applicationwillterminate-method-not-being-called. Your app shouldn't need one; it should 'gracefully' transition from being active to being dead. – CodaFi May 29 '13 at 05:47
-
NO ! This is not the answer for my question. You have edited your comment after I vote up. – enadun May 29 '13 at 06:29
2 Answers
1
- (void)applicationWillResignActive:(UIApplication *)application
{
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
}

Kasaname
- 1,491
- 11
- 15
-
These methods are calling, when I minimized the application by pressing the home button and other interruptions as well. – enadun May 29 '13 at 05:59
1
set variable in info.plist file Application does not run in background set yes like this
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
this method called when application enter background

kirti Chavda
- 3,029
- 2
- 17
- 29