Skip to main content

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
Filter by
Sorted by
Tagged with
46 votes
1 answer
2k views

PerformFetchWithCompletionHandler called twice when simulating with Xcode

In Xcode 7.0.1 the "simulate background" fetch command causes performFetchWithCompletionHandler to be triggered twice. Is this an Xcode debugging error, or can this happen on a device running a ...
MarkHim's user avatar
  • 5,736
35 votes
2 answers
15k views

How to troubleshoot iOS background app fetch not working?

I am trying to get iOS background app fetch to work in my app. While testing in Xcode it works, when running on the device it doesn't! My test device is running iOS 9.3.5 (my deployment target is 7....
Jason's user avatar
  • 2,313
31 votes
1 answer
4k views

expo.io's BackgroundFetch is not running the defined task

I am currently developing an app for iOS with expo sdk-version 32. I have to call a REST service periodically from my app. In order to do that I tried to utilize the new BackgroundFetch API. Here is ...
Struemmeck's user avatar
26 votes
2 answers
3k views

completionHandler of the 2 methods performFetchWitchCompletionHandler AND didReceiveRemoteNotification interfere each other?

I have a iOS (swift) Application available AppStore since November 2017. I added Firebase Analytics and Crashlytics to proactively see issues which didn't occur during development and testing. I'm ...
AlexWoe89's user avatar
  • 854
17 votes
4 answers
3k views

Background Fetch at Specific Time

I am looking for solution to get data in background mode even app is terminated. There are lots of tutorials and answers available for this questions, but my questions is different than other. I haven'...
Sagar Chauhan's user avatar
15 votes
2 answers
15k views

iOS10 Background fetch

I have tried to implement background fetch, to hopefully can wake the app from time to time. I have done these: func application(_ application: UIApplication, didFinishLaunchingWithOptions ...
user6539552's user avatar
  • 1,431
13 votes
1 answer
4k views

Dart Error: Dart_LookupLibrary: library 'package:background_fetch/background_fetch.dart' not found

How can I solve this problem: E/flutter (18287): [ERROR:flutter/shell/common/shell.cc(89)] Dart Error: Dart_LookupLibrary: library 'package:background_fetch/background_fetch.dart' not found. E/flutter ...
Maalmi's user avatar
  • 133
13 votes
2 answers
2k views

iOS Background Transfer - com.apple.nsurlsessiond folder full of tmp files

We've written a media application that allows you to get a list of latest videos as json list using BACKGROUND FETCH then it uses BACKGROUND TRANSFER to tell iOS to download the video one by one and ...
brian.clear's user avatar
  • 5,307
13 votes
1 answer
2k views

Keychain sometimes returns empty value [duplicate]

We are using native key-chain wrapper class to store and retrieve values from the key-chain. But in some case the value is getting deleted/empty. We have the below items enabled in our app Location ...
Narayanan Ramamoorthy's user avatar
12 votes
2 answers
14k views

Background fetch is not working after killing the app

I'm trying to get data from url with background fetch. My func tries to get data and if there is a new data, it sends local notification. Background fetch works after about 10 - 20 minutes when i ...
Meryem Uysal's user avatar
12 votes
5 answers
9k views

How to run operations in background while an iOS application is in foreground

I have a JSON file populated with strings data in Documents Directory. In user Interface of application there is a UIButton. On button press, a new string appends into the JSON file. Now I am looking ...
user3314286's user avatar
12 votes
2 answers
3k views

Suddenly getting many Fabric Out of Memory sessions: Can Fabric OOM Reports ever be false alarms?

I recently added background fetch in my application and it is working well. I recently noticed in Fabric that the amount of OOM free sessions have gradually gone from 100% to a daily average steady in ...
Barrett's user avatar
  • 470
12 votes
2 answers
454 views

Remote Notification callback not being called during phone call

I have created an app in which background fetch code is written on receiving push notification. I have enabled the background mode in .plist, content-available key is set to 1 in push notification ...
GAURAV VIG's user avatar
11 votes
1 answer
8k views

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 ...
LittleFunny's user avatar
  • 8,295
10 votes
2 answers
6k views

iOS11 swift silent push (background fetch, didReceiveRemoteNotification) is not working anymore

I was hoping that the iOS11 release will fix the silent push issue, which was in the latest betas and GM version of iOS. Currently I'm struggling to understand, why I don't receive any silent push ...
AlexWoe89's user avatar
  • 854
9 votes
3 answers
14k views

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 ...
user3251's user avatar
8 votes
3 answers
3k views

Will performFetchWithCompletionHandler be called if the app has been terminated

It's surprisingly difficult to find a definitive answer to this; couldn't find it mentioned in the Apple documentation and couldn't find a definite yes/no after searching past questions. The question ...
Piepants's user avatar
  • 37.1k
8 votes
6 answers
11k views

How to fetch data in background every hour in Swift even the app is terminated?

I am making an app that provides functionality to fetch data every hour. It fetches data even when the app terminates. How can I implement this functionality? After a lot searching I found background ...
Jack.Right's user avatar
7 votes
2 answers
677 views

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 ...
swalkner's user avatar
  • 17.1k
7 votes
1 answer
4k views

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 ...
NeoWang's user avatar
  • 18.1k
7 votes
4 answers
7k views

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:...
Billy Mahmood's user avatar
6 votes
1 answer
6k views

Does Flutter Background Fetch work on iOS when the app is terminated?

I'm building a Flutter app and need to call a function every day (to schedule some notifications). I came across the flutter_background_fetch package, which seems to be a perfect solution for Android, ...
nhjx's user avatar
  • 61
6 votes
1 answer
3k views

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 ...
ytpm's user avatar
  • 5,090
6 votes
3 answers
5k views

BGTaskScheduler.shared.register Not Called

I'm using background refresh to schedule local notifications and update my widget. The problem is that the task registration method isn't called! func application(_ application: UIApplication, ...
4mahmoud's user avatar
  • 853
5 votes
2 answers
3k views

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 ...
Jarod's user avatar
  • 495
5 votes
1 answer
2k views

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:...
FreeNickname's user avatar
  • 7,536
5 votes
4 answers
5k views

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 ...
tagirkaZ's user avatar
  • 469
5 votes
1 answer
2k views

Flutter Backgroundfetch on iOS doesn't fire

I'm trying to develop an app with flutter that uses the background_fetch package https://pub.dev/packages/background_fetch to connect within a specific time period to a BLE device and receives some ...
A.h.'s user avatar
  • 119
5 votes
1 answer
9k views

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 ...
AziCode's user avatar
  • 2,620
5 votes
0 answers
813 views

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 ...
johntvolk's user avatar
4 votes
3 answers
3k views

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 ...
Poles's user avatar
  • 3,672
4 votes
1 answer
987 views

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, ...
SwiftDeveloper's user avatar
4 votes
0 answers
2k views

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 ...
Daniel Montoya's user avatar
4 votes
1 answer
2k views

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 ...
zeus's user avatar
  • 12.6k
3 votes
3 answers
3k views

iOS background fetch

I'm little bit confused with background fetch. I read in Apple Developer documentation that fetch happens when OS decides that it should, user can't control background fetch, while on Apple Developer ...
user4191892's user avatar
3 votes
1 answer
6k views

Flutter WorkManager Background Fetch Example With StateFull Widget

I have a function called control in the StateFull Widget. I want to run this function with WorkManager every 15 minutes. How can I call the control function from the callbackDispatcher function? I ...
Ahmet Aytanozu's user avatar
3 votes
4 answers
3k views

Background Fetch Does Not Appear to Fire

In my app, I have performed the following listed below and have added counter to the app fetch routine to highlight the number of times fetch is called by iOS 8.1. Turned on Background Modes and ...
mkneisler's user avatar
3 votes
1 answer
855 views

Execute a Task after specific time, even if app is in background on iOS using Swift

I have a VPN-Client app that asks the user to pause the connection for 5, 30, and 120 Minutes. The user probably leaves the application to do some work outside of my app in this period, therefore I ...
Mahdi Moqadasi's user avatar
3 votes
1 answer
3k views

Flutter, background fetch package not working, androidx incompatibility

I wanted to make some operations while the app was not running, so I decided to use the background fetch package.I followed the android setup step by step This is part of my pubspec.yaml version: 1.0....
Niccolò Simoni's user avatar
3 votes
1 answer
799 views

0x8badf00d Crash after listening location on background fetch

In my ios app, I start listening user's location updates in the background for a while (up to 15 mins) when I receive background fetch execution. However, after I stop updates, the app crashes with ...
Hüsnü Şener's user avatar
3 votes
1 answer
1k views

Background Fetch iOS - Terminated Apps

I think this might be answered quiet a few time, but still there are some unknown cases that I wanted to clarify. I have been looking at Background Fetch API for one of my iOS application. I learned ...
Anwer's user avatar
  • 689
3 votes
1 answer
2k views

Flutter Fetch API in background when App is terminated

I'm want to fetch API every 15min and check if anything changes. Then if it does send push notification to inform the user about changes. Now my problem is that I cannot get to run the check on IOS. ...
Quentinio's user avatar
3 votes
0 answers
717 views

Background fetch stopped working on ios 13 and newer

If a method is Deprecated, does this mean it will not work in updated systems? I was using setMinimumBackgroundFetchInterval for background fetch and I believe it stopped working for ios 13 and newer ...
Ataman's user avatar
  • 2,580
3 votes
0 answers
770 views

Expo BackgroundFetch not working on android when app is terminated

The task gets registered it also works.When in recent apps it works.When gets deleted it stops working! Expo CLI 3.11.3 environment info: System: OS: Windows 10 Binaries: Yarn: 1.21.0 - C:\Users\Steve\...
Steve Moretz's user avatar
  • 3,088
3 votes
0 answers
137 views

OS X Background Fetch Equivalent

I'm familiar with the Background Fetch in UIKit but I was wondering if there is an equivalent for OS X apps. My application is bundled with a Safari App Extension that needs to update frequently. ...
tomjohn's user avatar
  • 321
3 votes
0 answers
2k views

Background fetch not executing

iOS is not executing PerformFetch. I've put the app in the background and just left the device. It's been three days and still PerformFetch is not executed. I know this because I'm using event ...
empo's user avatar
  • 1,163
3 votes
0 answers
463 views

How to schedule background services while an iOS app is closed?

I am working on an app that keeps people updated with news around a certain event. That means that I don't want to run background fetches all the time. And one more thing, what I understood from Apple'...
Ashraf Tawfeeq's user avatar
3 votes
0 answers
266 views

Swift Darwin notifications and background fetch

I have an app which is set up to use background fetch, remote notifications and push notifications (and app groups). I have the app working so that on receipt of a push notification, it will wake up ...
user2363025's user avatar
  • 6,495
3 votes
0 answers
259 views

iOS How to notify when a new photo added to photo album

I have a requirement to send an email whenever a new photo added to the photo album, similar stuff done by IFTTT app, but not getting any clue for where to start and how to proceed. I am not sure ...
Anshad Rasheed's user avatar
3 votes
0 answers
332 views

Will background fetch be called when app is in background?

Will iOS call performFetchWithCompletionHandler for the running app that is taken to background (using Home button)? I thought it is only called when iOS launches my app to do background fetch. If ...
user996142's user avatar
  • 2,863

1
2 3 4 5