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
46
votes
1 answer

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 release build of the application. Update Now we have…
MarkHim
  • 5,322
  • 5
  • 28
  • 61
35
votes
2 answers

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.1) I have enabled "Background fetch" under…
Jason
  • 1,993
  • 2
  • 17
  • 26
20
votes
0 answers

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 my Code: const BACKGROUND_LOCATION_SENDING_TASK…
Struemmeck
  • 311
  • 2
  • 5
20
votes
0 answers

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 currently struggling with the following Stacktrace,…
AlexWoe89
  • 764
  • 1
  • 8
  • 23
16
votes
4 answers

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't find any proper solution on stackoverflow, so…
Sagar Chauhan
  • 5,115
  • 2
  • 17
  • 48
13
votes
2 answers

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 launchOptions: [UIApplicationLaunchOptionsKey: Any]?)…
user6539552
  • 1,179
  • 2
  • 12
  • 35
13
votes
1 answer

Keychain sometimes returns empty value

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 service ON - Always state initially and user can…
13
votes
2 answers

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 go back to sleep and to wake the app when its…
brian.clear
  • 5,154
  • 2
  • 39
  • 60
12
votes
2 answers

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 the teens as low as 14%. I only saw a few…
Barrett
  • 460
  • 3
  • 11
12
votes
5 answers

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 for any iOS Service that helps me to send these…
user3314286
  • 243
  • 3
  • 17
12
votes
2 answers

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 minimize the app. But when i kill the app (double…
Meryem Uysal
  • 191
  • 1
  • 2
  • 12
12
votes
2 answers

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 payload, registered for push notification and using…
GAURAV VIG
  • 259
  • 1
  • 9
10
votes
2 answers

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 messages, which should actually wake up my app to…
AlexWoe89
  • 764
  • 1
  • 8
  • 23
8
votes
3 answers

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 is simple - if the app requests a background…
Gruntcakes
  • 36,166
  • 41
  • 170
  • 346
8
votes
6 answers

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 fetching using performFetchWithCompletionHandler.…
Jack.Right
  • 854
  • 1
  • 12
  • 28
1
2 3
14 15