IOS 7 Background Sample

I am developing an application using background selection.

I will need a function running in the background every 5 seconds, but with the code I saw in google, SO chooses when the function should be called.

I want this function to execute every 5 seconds.

My code is here:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.

[[UIApplication sharedApplication] setMinimumBackgroundFetchInterval:UIApplicationBackgroundFetchIntervalMinimum];
return YES;
}
+4
source share
1 answer

There is no way to do this. iOS is responsible for deciding when it is best to give your application the ability to receive content:

, , .

( docs)

+1

All Articles