• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Background fetch is never called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background fetch is never called


  • Subject: Re: Background fetch is never called
  • From: Viacheslav Karamov <email@hidden>
  • Date: Thu, 14 Dec 2017 11:38:14 +0200

Yes


13.12.17 16:09, Steve Christensen wrote:
Are you calling -[UIApplication setMinimumBackgroundFetchInterval:] in
-application:didFinishLaunchingWithOptions:? According to the documentation:

Specifies the minimum amount of time that must elapse between background fetch
operations.

This property has no effect for apps that do not have the UIBackgroundModes key
with the fetch value in its Info.plist file.

The default fetch interval for apps is
UIApplicationBackgroundFetchIntervalNever. Therefore, you must call this method
and set a fetch interval before your app is given background execution time.

On Dec 13, 2017, at 1:31 AM, Viacheslav Karamov <email@hidden> wrote:

Yes, I confirm that


12.12.17 23:16, Steve Christensen wrote:
Did you confirm that there is a UIBackgroundModes key in your app's Info.plist?

<key>UIBackgroundModes</key>
<array>
        <string>fetch</string>
</array>



On Dec 12, 2017, at 6:23 AM, Viacheslav Karamov <email@hidden> wrote:

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

References: 
 >Background fetch is never called (From: Viacheslav Karamov <email@hidden>)
 >Re: Background fetch is never called (From: Steve Christensen <email@hidden>)
 >Re: Background fetch is never called (From: Viacheslav Karamov <email@hidden>)
 >Re: Background fetch is never called (From: Steve Christensen <email@hidden>)

  • Prev by Date: Re: Problem with NSWorkspace.shared and uid 0
  • Next by Date: Re: Creating NSTableView programmatically
  • Previous by thread: Re: Background fetch is never called
  • Next by thread: Problem with NSWorkspace.shared and uid 0
  • Index(es):
    • Date
    • Thread