Questions tagged [ios-background-mode]

103 questions
4
votes
1 answer

How to call API when App is killed in react native?

I Want to call API in the background when App killed and set the data in AsyncStorage. I used the following library but not working for me. react-native-background-task react-native-background-fetch I want to called the API without time scheduling.…
3
votes
1 answer

Local notification not presenting when app is in background in Xamarin iOS

I have implemented chat functionality in my Xamarin.IOS app, as remote notifications are not possible to send from the server-side, I am using local notification to alert the user of new incoming messages. Everything works fine in the simulator, I…
3
votes
1 answer

Is it possible to execute something on main thread after didEnterBackground is called?

First of all I'd like to say sorry in case you consider my question dummy, I'm new to iOS and multithreading and just want to understand how things are going on. As far as I know didEnterBackground is the last function that iOS calls before app…
3
votes
1 answer

Airplay stop playing video streaming when app is in background or device locked

I'am using an AVPlayerViewController for playing video in streaming. When I launch Airplay on the AVPlayerViewController on the Apple TV and put the app in background or if I lock the device, the video paused on the Apple TV. I verify that like in…
3
votes
2 answers

Timers not running when screen is turned off / device is locked in iOS

The app is in the background and it receives a callback upon disconnection with the BLE device, after which the app has to wait for sometime(1minute) and then execute some piece of code. The app behaves as expected even when in the background if the…
3
votes
0 answers

In what cases can an app run after device reboot but before the user unlocks the device?

We are developing an app that can receive silent push notifications. Upon receiving the notifications, the app gets put into the background and executes some code. During this code execution the app needs to access an item in the keychain that is…
cbbcloud
  • 479
  • 5
  • 15
3
votes
1 answer

Keeping the app in background mode for continuos location updates

My project is using a CLLocationManager object, receiving updates via: locationManager:didUpdateToLocations: I want these updates even though my app is in the background. So in info.plist i have set the, "Required background modes" list to App…
Anders
  • 719
  • 8
  • 22
2
votes
0 answers

Delay a callback in iOS and run when app goes into the background

How can I run a callback even if the app goes into the background in iOS? I want to delay a function and run it only once after 5 to 30 minutes (time of my choice). Is there anyway to achieve this? My use case is, when the user postpones an event…
2
votes
1 answer

Swift - Bluetooth write characteristic in Background

I'm developing an App in Swift 5 that connects to a wearable device that measure body information (temperature, heart rate, etc.) For measure this information, I have to write a Data object in one characteristic of the device (and receive the…
2
votes
0 answers

Restore Peripheral BLE Services entering in background mode

I created an app which is a ble peripheral running on my iPhone. This peripheral is advertising and integrates services and characteristics. With nrfConnect or other scan ble apps I can connect and see all created services/characteristics as long as…
Silvering
  • 756
  • 1
  • 6
  • 33
2
votes
0 answers

Background fetch is not working on a real device

Please help with advice. For some reason, Background fetch on a real iOS device does not work. When running through Xcode (Debug -> Sumulate Background Fetch) everything works correctly. But when I install the app on a real device, this function…
Vergiliy
  • 1,248
  • 1
  • 13
  • 22
2
votes
1 answer

how does "idleTimerDisabled" work in didFinishLaunchingWithOptions?

I'm not sure how does the below code work in the didFinishLaunchingWithOptions in appdelegate ? [[UIApplication sharedApplication] addObserver: self forKeyPath: @"idleTimerDisabled" options: NSKeyValueObservingOptionOld |…
janubhai
  • 183
  • 1
  • 8
2
votes
4 answers

iOS - Background Services when app is terminated

Do background mode functions like Background fetch and Location update work if the app is terminated? Or it only works if the app enters background? Thanks
Mireille
  • 637
  • 2
  • 12
  • 27
2
votes
1 answer

REST request from iOS background URLSession using APNs

Update 2018-05-25: I replaced datatask with downloadTask after reading Rob's answer here: https://stackoverflow.com/a/44140059/4666760 . It still does not work when the app is backgrounded. Hello I need some help with iOS background tasks. I want…
2
votes
1 answer

How to know the Bluetooth device connection/disconnection status callbacks to an iOS application running in background?

As per apple documents apps running in background cannot receive callbacks except for apps which are location based, VOIP, Newstand, Music player or APNS enabled. How to receive the connection status callbacks in that case? The app is making use of…