On iOS 7.0 and below, SBFrontmostApplicationDisplayIdentifier
from the Springboard framework specified the app running in the foreground, but that capability has been blocked (considered as a vulnerability, see the Common Vulnerabilities and Exposures page dedicated to it here) in iOS 8.
Does anyone have an iOS 8 alternative for this?
To detect if an iOS application is in background or foreground we can simply use the UIApplication just like we can use it to detect many other things like battery state, status etc. The shared. application state is an enum of type State, which consists of the following as per apple documentation.
To see all your open apps in the App Switcher, do one of the following: On an iPhone with Face ID: Swipe up from the bottom of the screen, then pause in the center of the screen. On an iPhone with a Home button: Double-click the Home button.
To keep apps running in the background on iPhone, you can turn on the background app refresh feature. Go to Settings, General, Background App Refresh and turn it on. In the following apps, toggle on the ones you want to keep running.
It is not possible to do it on iOS 8 since a vulnerability was discovered. More info here: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-4361
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With