Background fetch is never called
Background fetch is never called
- Subject: Background fetch is never called
- From: Viacheslav Karamov <email@hidden>
- Date: Tue, 12 Dec 2017 16:23:47 +0200
I have configured Background Fetch at the "Capabilities" tab in my
Project's settings. Then added to the App delegate:
-(void)application:(UIApplication *)application
performFetchWithCompletionHandler:(void
(^)(UIBackgroundFetchResult))completionHandler
{
NSLog(@"########### Received Backgroudn Fetch ###########");
//Increase Badge Number
[UIApplication sharedApplication].applicationIconBadgeNumber++;
completionHandler(UIBackgroundFetchResultNewData);
}
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UIApplication sharedApplication]
setMinimumBackgroundFetchInterval:UIApplicationBackgroundFetchIntervalMinimum];
return YES;
}
When I run my simple App on the real device (tested on iPad mini 2 with
iOS 10.2 and iPhone 6S running iOS 11.2) nothing happened during long
time period (more than 10h). I even tried to add "Remote Notifications"
capability and it also didn't help.
Regards,
Viacheslav.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden