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:

238 questions
3
votes
3 answers

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 forum post by Apple employee says that if user…
user4191892
  • 85
  • 1
  • 5
2
votes
1 answer

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 need to Reconnect the app even if is in the…
2
votes
1 answer

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. Does anyone have a solution for this?
2
votes
0 answers

Can background fetch be triggered by push notifications or app open?

I have a background task handled in performFetchWithCompletionHandler and it has complex logic including API request and iCloud sync. It's working fine by itself but according to user feedbacks/events sometimes it runs in the foreground and it…
M D
  • 39
  • 1
  • 7
2
votes
1 answer

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 added a Stream statically to the Statefull widget…
Ahmet Aytanozu
  • 111
  • 2
  • 9
2
votes
0 answers

background fetch not working with accelerometer in react native expo

im using below code to fetch the accelerometer values when my app is running in the background i have added the below code ouside of the app component TaskManager.defineTask('firstTask', async ({ data, error }) => { if (error) { // Error…
2
votes
1 answer

Custom timer in swiftui stops to count in background fetch when user hide app or turn off device

I'm trying to use this cool timer from kavsoft But when i hide app or turn off screen device (not close app) this timer after a couple of seconds or minutes in the background mode stops counting and stops. If I open the application, it continues to…
2
votes
1 answer

Flutter Background_fetch lib does not run after terminating app

I'm trying to implement push notifications type function to remind user some events. I want my App to get content from server once or twice in a day. I'm trying to use background_fetch library. Problem is that when app is terminated Job does not get…
oto
  • 383
  • 4
  • 18
2
votes
1 answer

Background fetch when app is terminated react-native Android

I have searched the internet for quite a while now, and I couldn't find anywhere a proper documentation to implement background fetch when app is terminated(not in background). I have followed the documentation and implemented it like this: …
2
votes
0 answers

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\AppData\Roaming\npm\yarn.CMD npm: 6.9.0 -…
Steve Moretz
  • 2,758
  • 1
  • 17
  • 31
2
votes
1 answer

How to use expo-background-fetch to fetch a specific url every 60 seconds?

I have tried almost any example provided in docs but I can't run it. I want to make a request to a specific url with axios (or fetch method) every 60 seconds and process the data in the background. In other words I want something common…
sina farbod
  • 497
  • 4
  • 17
2
votes
2 answers

How do I implement background fetch using a data task?

I'm trying to implement background fetch in an iOS app. In the official documentation is stated: "You don’t have to do all background network activity with background sessions ... ... . Apps that declare appropriate background modes can use default…
Daniele Cux
  • 348
  • 2
  • 12
2
votes
1 answer

IOS: How to detect timezone changed by user in background fetch

Is there any way to detect when user change the phone timezone, or when it changes automatically at background fetch?! I need to reschedule all my local notifications when the phone timezone changes.
NabiMo
  • 105
  • 9
2
votes
0 answers

How to legally run app frequently in the background in iOS 12 and Swift 4

Is there a good/safe/legal/responsible way for me to run code indefinitely at a scheduled interval while the app is in the background or while it's quitted? I'm trying to build a feature into my app where the user can start a logging system that…
Microbob
  • 672
  • 5
  • 20
2
votes
0 answers

Read healthkit heart rate when app is running in background using notifications

Question 1. When a new heart rate sample is added to the healthkit, I want to read this sample immediately even when the app is running in background by using notifications method.Is this really possible, reliably? So far, I tried the background…