How can I detect when a user exits the application? (hitting the home button) And how can I detect when the relaunch it? (clicking the icon)
*I\'m not talking about
- (void)applicationDidEnterBackground:(UIApplication *)application
and
- (void)applicationDidBecomeActive:(UIApplication *)application
In your AppDelegate.m
- (void)applicationWillTerminate:(UIApplication *)application
There's a notification UIApplicationDidGoToBackground
that fires when the home button is pressed. A similar notification tells you about going back to foreground.