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

DownloadTask gets paused while executing as part of the Background Fetch, if app is not in the foreground?

I need to perform a task periodically, once a day to be exact, so I implemented background fetch with minimumBackgroundFetchInterval of 23 hours. It gets done when I simulate background fetch with my app in the foreground. But when my app is in the…
andrija
  • 332
  • 3
  • 9
1
vote
2 answers

what is the use of performFetchWithCompletionHandler in app delegate?

I am a bit confused with how performFetchWithcompletionHandler engaged with the iOS app life cycle. In the docs it's mentioned that it gives us 30 seconds to download any data but will our app freeze for 30 seconds at that time?
1
vote
2 answers

React Native: Simulate Background Fetch disabled

I'm trying to simulate background fetch in a React Native project React Native version 0.57.3 Xcode Version 10.0 (10A255) I've opened the ios project on Xcode and then I build the project then run it, but the option to simulate background fetch is…
1
vote
2 answers

Background fetch not working - Not firing notification

I'm trying to implement Background Fetch API in my app for that I've configured as below. I've enabled Background Fetch from Capabilities. In AppDelegate.swift Added this in didFinishLaunchingWithOptions…
Mahendra
  • 8,448
  • 3
  • 33
  • 56
1
vote
0 answers

Background fetch work on simulator(I can see logs) but not working on real device

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { Fabric.with([Crashlytics.self]) GADMobileAds.configure(withApplicationID:…
1
vote
1 answer

Alamofire not working while called from background fetch

I'm using background fetch in an iOS app to schedule some notifications and I need to fetch some data from server But when i create an Alamofire request the surver returns the data but alamofire does not calles my compilation handler…
hasan
  • 966
  • 2
  • 13
  • 40
1
vote
1 answer

iOS background fetch fails when device battery is below 40%

We recently found that even though Low-battery mode is enabled or disabled, the background fetch fails when the device battery level is low. We haven't figure out what is the exact battery level it does support, as some of our test devices fail…
Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109
1
vote
1 answer

iOS Periodic Background Polling Rest API

I want to create an iOS app where my app simply polls a public REST API every minute, in background, and give me local push notification if data from REST API matches my condition. Is this something that is possible and allowed by Apple?
user1955934
  • 3,185
  • 5
  • 42
  • 68
1
vote
0 answers

Background Fetch does not execute on device

I have an Xamarin IOS Application for which I want to implement a background fetch. When I trigger it on the simulator it works as expected. But on the device it is never executed. In the AppDelegate "FinishedLaunching" I set the interval to the…
NPadrutt
  • 3,619
  • 5
  • 24
  • 60
1
vote
1 answer

Background Fetch runs once on Xamarin.ios for iOS 9 +

I'd like to have a background fetch in Xamarin.ios. As I've followed this tutorial : https://github.com/Redth/iOS.BackgroundFetch.Sample, when I run application ,on a simulator, in background fetch mode, application calls only one time PerformFetch…
1
vote
0 answers

iOS background fetch keeps launching the app

I'm working on an iOS application which had Background Fetch enabled via the Info.plist for around a year. There were multiple versions released with background fetch enabled, but then a few weeks ago the feature that necessitated background fetch…
1
vote
1 answer

react-native - showing notification after a specific intervals of time - iOS

I have a scenario where I need to remind user after every specific period of time (usually 3 days) using local notification and not using internet based push-notifications. I am using react native and have a background in Native Android…
1
vote
1 answer

Xamarin Form: iOS how to simulate background fetch expired

I can simulate the background fetch using iOS simulator. Is it possible to simulate the expiration so it can call the expire handler? I tried to use a infinite loop and run as background fetch on an simulator but doesn't seem to trigger it. task =…
LittleFunny
  • 8,155
  • 15
  • 87
  • 198
1
vote
1 answer

HKObserverQuery only runs when the application is reopened

So I've been following the instructions in this answer... Healthkit background delivery when app is not running The code runs fine and works whilst the application is open and says that background delivery is successful, however when I test the…
user3599895
  • 275
  • 1
  • 2
  • 13
1
vote
0 answers

How many time performFetchWithCompletionHandler gave to the app to process everything?

I don't understand, in the doc about performFetchWithCompletionHandler they say: https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623125-application your app has up to 30 seconds of wall-clock time to perform the download…
zeus
  • 12,173
  • 9
  • 63
  • 184