Q:

Is it possible to call webRequest when application goes in background?

I want to upload images when home button pressed and application goes in background.
Is it possible? If yes then how? and if no then do i have any other alternative?
Thanks in advance...

A:

You can perform a task in background by using this code for a specific time-
 UIBackgroundTaskIdentifier bgTask = 0;
    UIApplication  *app = [UIApplication sharedApplication];
    bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
        [app endBackgroundTask:bgTask]; 
    }];
    self.silenceTimer = [NSTimer scheduledTimerWithTimeInterval:10 target:self
                                                       selector:@selector(startLocationServices) userInfo:nil repeats:YES];

Refer this:
http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html
I think this will help u. :)

