I am trying to update an iOS7 application. I do not think it is working properly.
I add to info.plist
Required background modes - The application downloads content from the network
In my main view controller
UIApplicationDelegate set as a delegateIn Viewdidload I put [[UIApplication sharedApplication] setMinimumBackgroundFetchInterval:1.0];
I add the following method
- (void)application:(UIApplication *)application performFetchWithCompletionHandler: (void (^)(UIBackgroundFetchResult result))completionHandler { NSLog(@"Refresh from Background"); }
I plug in my iPhone and run the application, and then got to Debug -> Simulate Background Selection
NSLog does not print. (If my application is in the foreground, it will be placed in the background)
Thanks!
source share