I'm developing an iOS app that updates data to server every minute. I wants to work this data update even when app goes to background. I've enabled the "Background mode" in "capabilities" and not checked any background options. Also used the below code
UIApplication* app = [UIApplication sharedApplication];
bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
NSLog(@"beginBackgroundTaskWithExpirationHandler");
//[app endBackgroundTask:bgTask];
//bgTask = UIBackgroundTaskInvalid;
}];
Imp : I've commented the [app endBackgroundTask:bgTask]
and bgTask = UIBackgroundTaskInvalid
.
Now my app working well in background.
My query is,Is there any chance to reject my app from App Store due to this ?