My iOS app doesn't run in background. When home button is hit the app will terminate.
Below is my code
- (void)applicationDidEnterBackground:(UIApplication *)application
{
double sleepTime = [[UIApplication sharedApplication] backgroundTimeRemaining] - 1;
[self performTaskforTime:sleepTime];
}
If the application is relaunched in no time, the New instance of the app will killed with the error :
Exception Type: 00000020 Exception Codes: 0x8badf00d Highlighted Thread: 0
Application Specific Information: My_App failed to launch in time
I can't reduce the sleep time. Is there any solution for this?