Questions tagged [ios-background-mode]

103 questions
201
votes
9 answers

Is there any way to check if iOS app is in background?

I want to check if the app is running in the background. In: locationManagerDidUpdateLocation { if(app is runing in background){ do this } }
93
votes
9 answers

Periodic iOS background location updates

I'm writing an application that requires background location updates with high accuracy and low frequency. The solution seems to be a background NSTimer task that starts the location manager's updates, which then immediately shuts down. This…
pcoving
  • 2,770
  • 1
  • 21
  • 17
76
votes
1 answer

iOS 13 - WkWebView: audio stops when in background

I've an app that uses WkWebView to play audio from Soundcloud, on iOS 13 Beta 6 the audio stops when the app is not in foreground, even when Audio is on in Background Modes. When starting the playback this assertion is thrown: Error acquiring…
50
votes
3 answers

What is the Xcode "Background Processing" Background Mode?

In Xcode 11, there is a new Background Mode, "Background Processing". I cannot find any information on what this new Background Mode does. Are there any resources with that information? This mode can somehow effect application that is using…
phnmnn
  • 12,813
  • 11
  • 47
  • 64
35
votes
7 answers

Background Location Services not working in iOS 7

I've recently upgraded my iOS devices to use iOS 7. One of the apps that we're developing uses background location services to track device location and all of our testers have reported that the app no longer appears to track in the background under…
Alan Samet
  • 1,118
  • 2
  • 15
  • 18
24
votes
2 answers

iOS 12 terminates apps in the background for no reason

Starting from iOS 12 the CLLocationManager doesn't run endless anymore in the background. The app get's terminated without a crashlog at random times. This was working fine before iOS 12. To demonstrate this problem I've created an sample app…
Sjoerd Perfors
  • 2,317
  • 22
  • 37
13
votes
1 answer

iOS 13 - Using BGTaskScheduler doesn't work all the time

THE PROBLEM: I want to run a simple function, 5 seconds after app goes into background. I had to implement BGTaskScheduler, to support iOS 13. The old implementation for BackgroundTask works for me on older iOS versions. I added background modes as…
9
votes
0 answers

How does BGProcessingTask works?

I'm trying to understand the the specifics of the background work in iOS 13. Will the BGProcessingTask be done if the user did not enter the application for a week or or will it never be fulfilled if a week has passed ? Apple says that…
Oleg
  • 91
  • 1
7
votes
1 answer

why my iOS app restarts from first screen after coming back to foreground mode?

When in My iOS app which which is in the detail screen and I press home button which will result it in going to background mode. After inactivity of 7 around minutes, I relaunch it and it doesn't start from where I left it. It starts from the first…
5
votes
1 answer

What is background mode remote notifications for in Xcode

I always thought it was for push notifications but there is an option below for push notifications and lately, all apps are being rejected because they say we are using NFC which we are not using. I joined the company a few months ago and no one…
user1898829
  • 3,437
  • 6
  • 34
  • 62
5
votes
1 answer

CoreLocation stops working in background after certain amount of time

I am developing an iOS (7.0+) application for fitness (running) that uses the users GPS location, does a small calculation and transmits the data to a Bluetooth Low Energy (4.0) watch. This process needs to be happening in the background, even when…
4
votes
0 answers

Keeping BLE Flutter application in iOS alive in background

I have Flutter application which receive and process (upload to server) data from BLE device. According to iOS background modes, application should be kept alive or waken up once BLE message is received. So if I receive this messages every second…
Michael
  • 151
  • 1
  • 8
4
votes
2 answers

No sound after connecting to WebRTC when app is launched in background using PushKit and CallKit on the lock screen

Everything works fine if we launch the app in the foreground. But there is an issue when the app is previously killed and is restarted by receiving a PushKit notification on the lock screen. When the app receives a PushKit notification we display…
sidslog
  • 654
  • 1
  • 6
  • 15
4
votes
3 answers

Swift4.2 Type 'UIBackgroundTaskIdentifier' (aka 'Int') has no member 'invalid'

I'm getting a weird issue where code which works in one XCode project fails to compile in another. Both run Swift4.2. Why do I get "UIBackgroundTaskIdentifier has no member 'invalid' error? import UIKit import Foundation //Type…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
4
votes
1 answer

How to continue tracking location after the user restarts the phone?

My application need to post the location data to my backend. I have set the location permissions to always and set the pausesLocationUpdatesAutomatically to false for CLLocationManager and need to continue tracking the phones location even when the…
Bagusflyer
  • 12,675
  • 21
  • 96
  • 179
1
2 3 4 5 6 7