Questions tagged [background-fetch]

Background fetch is a background execution mode on iOS 7 and newer, used for apps that regularly update their content by contacting a server can register with the system and be launched periodically to retrieve that content in the background.

Background fetch is a background execution mode on iOS 7 and newer, used for apps that regularly update their content by contacting a server can register with the system and be launched periodically to retrieve that content in the background.

Documentation:

214 questions
8
votes
3 answers

iOS background fetch custom interval

I read all Apple documentation about background fetch and currently I'm using it like this: [[UIApplication sharedApplication] setMinimumBackgroundFetchInterval:minimumBackgroundFetchInterval]; I let OS to decide when to perform background fetch,…
user3251
  • 83
  • 1
  • 1
  • 3
7
votes
2 answers

iOS: server calls in background often lead to timeout

My app makes some server calls whenever it is started, now I face a weird problem: when a push notification with content_available wakes up my app the calls are made as well, but more often than not they run into a timeout. Does this have to do with…
swalkner
  • 15,150
  • 25
  • 107
  • 195
7
votes
1 answer

How often is background fetch executed in iOS?

In iOS 7, a background fetch mode is supported for apps to fetch data when the app is not frontmost: When it is convenient to do so, the system launches or resumes the app in the background and gives it a small amount of time to download any new…
NeoWang
  • 13,687
  • 19
  • 61
  • 112
6
votes
1 answer

What is the different between background task and background fetch correctly?

I am looking at some document on the web about background task and background fetch. Background task is a task which performance at the background while the app still running. When the app is in the background, the task have a limited time to get…
LittleFunny
  • 7,205
  • 11
  • 71
  • 166
5
votes
1 answer

I get a warning saying that the completion handler was never called When I simulate a Background fetch

I followed all the steps in order to set up the background fetch but I'm suspecting that I made a mistake when writing the function performFetchWithCompletionHandlerin the AppDelegate. Here is the warning that I get as soon as I simulate a…
AziCode
  • 2,072
  • 5
  • 23
  • 43
5
votes
1 answer

Send silent push notification to app, update location and send to server in background

I want to send a silent push notification to an application that is in background, then fetch the current user location and send it to a web service. I implemented push notification methods and also those two: - (void)application:(UIApplication…
5
votes
1 answer

Should I call setMinimumBackgroundFetchInterval every time the app restarts?

I developed an app that uses background fetch. I set the minimum interval between updates to minimum: [[UIApplication sharedApplication] setMinimumBackgroundFetchInterval:UIApplicationBackgroundFetchIntervalMinimum]; I thought that this value is…
FreeNickname
  • 7,203
  • 2
  • 25
  • 56
5
votes
2 answers

What are the best practices for multiple async requests in background-fetch?

I have an app that can have more than one user account. I need to update all of them in background. The problem is: time is limited (~30 sec but requests may take longer than that) all requests are asynchronous When should I call a completion…
Jarod
  • 507
  • 5
  • 16
5
votes
4 answers

How can I detect my app was launched for background fetch in didFinishLaunchingWithOptions method?

I want to check whether my app was launched for background fetch in my application delegate's didFinishLaunchingWithOptions. There is nothing in launchOptions dictionary. So is there any way to check it? I know that I can check applicationState, but…
tagirkaZ
  • 461
  • 7
  • 19
5
votes
0 answers

iOS background fetch on app launch causes black screen

I have been successfully using background fetch in the iOS app I'm developing, but I've noticed a strange bug that I'm having trouble squashing. The initial symptom was that sometimes when I launched the app, the launch image would show, and then be…
johntvolk
  • 76
  • 4
4
votes
4 answers

Flutter access database in background fetch on Android

I am trying to access the local database on the device while the app is completely closed, to achieve this I am using the sqlite plugin sqflite: ^1.2.0 and the background fetch plugin background_fetch: ^0.4.0. I am able to register the headless…
Billy Mahmood
  • 1,097
  • 2
  • 16
  • 33
4
votes
0 answers

How to observe photo library changes even when app is closed?

I need to be notified when a photo/video is taken, even when my app is closed. Does anybody know how apps like Google Photos achieve this in iOS? So far, I have implemented and registered PHPhotoLibraryChangeObserver however photoLibraryDidChange…
4
votes
3 answers

Background Upload is not working in Swift

I was trying implement a code where a API will be called shortly after a file has been uploaded into AWS server but it must be in background mode. Whereas the AWS sdk manages uploading file into their server in background mode but the following code…
Poles
  • 3,307
  • 6
  • 38
  • 82
4
votes
1 answer

Warning: Application delegate received call to -application:performFetchWithCompletionHandler: but the completion handler was never called

I implement the performFetchWithCompletionHandler (ie: background fetch) to download some data from a server. To do this, inside performFetchWithCompletionHandler, to not block the main thread, i create and start a new task (so in a background…
zeus
  • 9,795
  • 5
  • 45
  • 112
4
votes
1 answer

Swift background fetch location updates with Core Location

I want to use Background Fetch Location Updates service on my app. But don't show any output my codes here i want your help. import CoreLocation class ViewController: UIViewController, UITextFieldDelegate, CLLocationManagerDelegate { var…
SwiftDeveloper
  • 6,588
  • 11
  • 50
  • 75
1
2
3
14 15