title: applicationWillTerminate not called when application stopped from Xcode
body: <p>I have got into an strange issue, where the <code>- (void)applicationWillTerminate:(UIApplication *)application{}</code> and <code>- (void)applicationDidEnterBackground:(UIApplication *)application{}</code> are not called when I try to stop the application from Xcode as opposed to home button.</p>