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
1
vote
1 answer

Check for new post on forum every hour Swift

I am making a app that is checking if there is new posts and threads on a forum page like reddit. The app is notifying the user when there is a new post, with background fetch, but if the user closes the app, the background fetch doesn't work. Also,…
vladasha
  • 403
  • 8
  • 15
1
vote
0 answers

How to Call Background Fetch Completion Handler Properly

Currently, I am using an API (PowerAPI) in which the "authenticate" function is called and then once the user's data has been processed, a notification is sent out. This authenticate function needs to be called as a background fetch. My question…
user3274871
  • 194
  • 1
  • 1
  • 11
1
vote
0 answers

iOS background fetch, where and when to schedule

I want to use background updates for one of my apps, and little bit confused about the logic of background fetch - where and when I have to call setMinimumBackgroundFetchInterval: method? Tutorials on the web are advising to call it on…
Fahri Azimov
  • 11,470
  • 2
  • 21
  • 29
1
vote
0 answers

Background Fetch delegate called twice on device when simulate Background Fetch

I added the following method to my app delegate and enabled background fetch in capabilities: -(void)application:(UIApplication *)application performFetchWithCompletionHandler:(void…
iamarnold
  • 705
  • 1
  • 8
  • 22
1
vote
1 answer

iOS background fetch running for too long?

I have a background job that runs every 7 hours, it makes an API call that take approximately 1-3 seconds. Looking at the battery section of the setting it’s showing that the job has been running in the background for 40 minutes in the past 20…
aryaxt
  • 76,198
  • 92
  • 293
  • 442
1
vote
1 answer

Options for sending data to server/retrying requests in background

We're working on an enterprise app that sends form data entered by the user to the server. The app attempts to send the data immediately after the user taps Save. If there is a problem sending the data (e.g. no network connection), we want to try…
Mike Mertsock
  • 11,825
  • 7
  • 42
  • 75
1
vote
1 answer

Initiating Background transfer service in background fetch ios

My objective is to send data/image to the server when the app is in background. From iOS7, we can do this using background fetch. But the background fetch only offers 30 sec time limit. The data which I am sending to the server may take longer time…
Ronald Randon
  • 1,141
  • 3
  • 13
  • 19
1
vote
0 answers

How to download content in background at specific time?

What I need to do is fetching content on iOS from network at a specific time (let's say 21:00) on a daily basis. If I use background fetch approach: there is no guarantee that fetching happens at a specific time. Also, there is no guarantee that it…
Mert Buran
  • 2,989
  • 2
  • 22
  • 34
1
vote
1 answer

Scheduling an ersatz background fetch in iOS

I'm trying to get my app to perform a background fetch at a specific, scheduled time. I had the idea of letting iOS sort this out for itself, so (in AppDelegate): - (BOOL)application:(UIApplication *)application…
headbanger
  • 1,038
  • 1
  • 11
  • 32
1
vote
0 answers

ios background fetch app settings - read from info.plist in code

In my iOS App I've enable the Backgrdound Fetch capability available since iOS 7 (Project > Capablities > Background Modes > Background Fetch). Initially, I defined a boolean setting (I called it "Enable Background Fetch") in Root.plist allowing the…
chrx
  • 2,169
  • 5
  • 24
  • 45
1
vote
2 answers

Detect if ios background fetch is running when app in foreground

I have a background fetch that updates my local sqlite data. If the app is also running in the foreground, I want to be able to detect if the background fetch is running in order to stop the UI attempting to load partially populated sql rows. How…
DEzra
  • 2,978
  • 5
  • 31
  • 50
1
vote
2 answers

Background fetch not working

I'm having a problem getting Background fetch to work. See my code below. I added fetch as background mode in info.plist. I simulate the fetch using Debug -> Simulate background fetch. Nothing is output in the console log. I couldn't find any good…
James
  • 311
  • 1
  • 4
  • 10
1
vote
1 answer

Background fetch in iOS

Coming from Android development where we have background services that run nicely its a little hard for me to start thinking the Apple way. What we achieved in Android was that our background service keeps updating our database at regular interval…
ata
  • 8,853
  • 8
  • 42
  • 68
0
votes
0 answers

how to register background task for IOS? I need to get current geolocation and send it. In flutter

here is my code for background task: const String notificationChannelId = "foreground_service"; const int foregroundServiceNotificationId = 888; const String initialNotificationTitle = "TRACK YOUR LOCATION"; const String initialNotificationContent =…
0
votes
0 answers

How to work with background_fetch plugin in flutter?

Returns this error when I trying to run project: Launching lib/main.dart on sdk gphone64 arm64 in debug mode... Running Gradle task 'assembleDebug'... FAILURE: Build failed with an exception. What went wrong: Execution failed for task…
Rustem
  • 1